/simple-artifact-uploader

A plugin for the Gradle build management tool that allows us to automatically upload completed binaries to the Artifactory deployment server.

Primary LanguageJavaOtherNOASSERTION

Simple Artifact Uploader

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.

Master Branch Build Status Coverage Status Gradle Plugin

License

cc0

Note: By contributing to this project, you agree to license your work under the same terms as those that govern this project's distribution.

Install

For all versions of gradle

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"

Syntax introduced in gradle version 2.1

plugins {
  id "gov.loc.repository.simple-artifact-uploader" version "1.0"
}

Usage

Configuring the plugin

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 
}

Adding more artifacts to be uploaded

task myJar(type: Jar)

artifacts {
    archives myJar //register the output of the myJar task as an artifact. All registered artifacts are automatically uploaded.
}

Help

  • For more information about where to put your gradle.properties file see here

Development

  • 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

Contribute

Please send us your pull requests! See the roadmap or issues for areas where you can help us improve

Roadmap

  • extend config for controlling other aspects of the rest api requests (timeout, number of tries, etc)