Class ExtensionsUtils
java.lang.Object
org.jfrog.gradle.plugin.artifactory.utils.ExtensionsUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ArtifactoryPluginConventiongetArtifactoryExtension(org.gradle.api.Project project) Get the Artifactory extension that is defined at the root project of a given projectstatic ArtifactoryPluginConventiongetExtensionWithPublisher(org.gradle.api.Project project) Get an extension of a given project that configured a publisher with: contextUrl and repoKey/snapshotRepoKey If the current project didn't configure a publisher tries the parent until one is foundstatic ArtifactoryPluginConventiongetOrCreateArtifactoryExtension(org.gradle.api.Project project) Get or create if not exists an artifactory extension for a given projectstatic org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration.PublisherHandlergetPublisherHandler(org.gradle.api.Project project) Get the configured (contextUrl and repoKey/snapshotRepoKey) publisher handler of a given projectstatic voidupdateConfig(org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration configuration, org.gradle.api.Project project) Update and fill a given client configuration with information from: 1) Start parameters 2) System properties 3) special buildInfo properties 4) default publisher attributes
-
Constructor Details
-
ExtensionsUtils
public ExtensionsUtils()
-
-
Method Details
-
getOrCreateArtifactoryExtension
public static ArtifactoryPluginConvention getOrCreateArtifactoryExtension(org.gradle.api.Project project) Get or create if not exists an artifactory extension for a given project- Parameters:
project- - the project to fetch/create its extension- Returns:
- project extension
-
getArtifactoryExtension
Get the Artifactory extension that is defined at the root project of a given project- Parameters:
project- - the project that will get its root's extension- Returns:
- Artifactory's extension defined at the root project if exists
-
getExtensionWithPublisher
Get an extension of a given project that configured a publisher with: contextUrl and repoKey/snapshotRepoKey If the current project didn't configure a publisher tries the parent until one is found- Parameters:
project- - the project to fetch its publisher configurations- Returns:
- an Artifactory extension with publisher configured or null if not found
-
getPublisherHandler
public static org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration.PublisherHandler getPublisherHandler(org.gradle.api.Project project) Get the configured (contextUrl and repoKey/snapshotRepoKey) publisher handler of a given project- Parameters:
project- - the project to fetch its publisher configurations- Returns:
- a configured publisher handler or null if not found
-
updateConfig
public static void updateConfig(org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration configuration, org.gradle.api.Project project) Update and fill a given client configuration with information from: 1) Start parameters 2) System properties 3) special buildInfo properties 4) default publisher attributes- Parameters:
configuration- - configuration to updateproject- - project to get parent information and start parameters
-