The plugin providied by artifactory involves a lot of configuration. This plugin was created to simplify uploading gradle built artifacts to artifactory. It uses artifactory's rest api to do the actual work.
Note: By contributing to this project, you agree to license your work under the same terms as those that govern this project's distribution.
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.gov.loc.repository:simple-artifact-uploader:1.0"
}
}
apply plugin: "gov.loc.repository.simple-artifact-uploader"
plugins {
id "gov.loc.repository.simple-artifact-uploader" version "1.0"
}
artifactory{
folder "foo"
url = "http://<artifactoryServer>:<PORT>/artifactory" //the url of artifactory
repository = "rdc-snapshots" //which repository to upload to
username = "${artifactory_username}" //the user to authenticate with. Property should be located in your private gradle properties file
password = "${artifactory_password}" //password of the user. Property should be located in your private gradle properties file
}
task myJar(type: Jar)
artifacts {
archives myJar //register the output of the myJar task as an artifact. All registered artifacts are automatically uploaded.
}
- For more information about where to put your gradle.properties file see here
- Version number
- 1.X is for development using the current gradle model
- 2.X is for development using the new gradle model and rules
- Master branch will be used for publishing to plugins.gradle.org
Please send us your pull requests! See the roadmap or issues for areas where you can help us improve
- extend config for controlling other aspects of the rest api requests (timeout, number of tries, etc)