Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

We highly recommend also using our

Newtablink
Textexamples
URLhttps://github.com/JFrogDevJFrog/project-examples/tree/master/gradle-examples
 as a reference when configuring the DSL in your build scripts.

...

  • When defining the configuration anywhere in the hierarchy, all sub-projects beneath it inherit the configuration and can override it whether it is defined in the root or in a sub-project. 
  • Each sub-project can override the publish closure or the repositories closure, or both of them.

    Code Block
    titleExample for overriding publication only
    artifactory {
    	publish {
    		contextUrl = 'http://localhost:8081/artifactory'
    		repository {
    			repoKey = "libs-snapshot-local"
    			username = "user"
    			password = "pass"
    		}
    	}
    }

     

  • For buildInfo to be published, a publish closure must be defined in the root project.

  • Use the artifactoryPublish.skip flag to deactivate analysis and publication.
  • Activate the corresponding artifactoryPublish Gradle task manually for each project to which you wish to apply the plugin. For example in our 

    Newtablink
    TextGradle project example
    URLhttps://github.com/JFrogDevJFrog/project-examples/tree/master/gradle-examples/gradle-example
     you can run:

    Code Block
    titleActivating the plugin manually
    ./gradlew clean api:artifactoryPublish shared:artifactoryPublish

...

Project examples which use the Gradle Artifactory Plugin are available

Newtablink
Texthere
URLhttps://github.com/JFrogDevJFrog/project-examples/tree/master/gradle-examples
.

...