The Gradle Artifactory Plugin supports all versions of Gradle including Gradle 2.0 and is available from the Gradle Plugins Gallery.
If you are already using the Gradle Artifactory Plugin, and are upgrading it to be compliant with Gradle 2.0, please refer to Upgrading the Gradle Artifactory Plugin.
Using the Correct Plugin ID
The Gradle Artifactory Plugin ID depends on two parameters:
To simplify these documentation pages, the plugin ID will be referred to using a <PLUGIN ID> placeholder.
This placeholder should be replaced with the plugin IDs listed in the table below:
Download and Installation
Modify your Gradle scripts to download the Gradle Artifactory Plugin using the plugins closure as follows:
Newer versions of gradle may require that you have a version number on your artifactory plugin, you can easily find the latest version number published this way by checking bintray:
Using a Snapshot Version
To use a snapshot version of the plugin take the following steps:
Add the following
In the dependencies DSL change the version tag to 3.0.x-SNAPSHOT as follows:
Apply the plugin to your project using the correct plugin ID
The latest plugin jar file can be downloaded from the
JFrog Artifactory public demo. Copy the jar into your gradle home plugins directory (
Using the Artifactory Plugin DSL
The Gradle Artifactory plugin can be configured using its own Convention DSL inside the
The syntax of the Convention DSL is described below:
The Artifactory Project Publish Task
The Artifactory Publishing Plugin creates an
You can configure the project-level task directly with the task's
Controlling the Published Modules
To control which modules of a multi-module build, are published to Artifactory you can:
Controlling the Build Name Number in BuildInfo
By default, BuildInfo is published with a build name constructed from the name of your root project and a build number that is the start date of the build.
The above properties are specified as standard Gradle properties.
You can also control the build name and number from within the Convention object DSL as shown at the end of the Convention DSL syntax above.
Upgrading from Gradle 1.x to Gradle 2.x
If you are already using the Gradle Artifactory Plugin and only need to upgrade Gradle version 1.x to Gradle v2.x, follow these steps:
Watch the Screencast
To see the Gradle Artifactory Plugin in action please watch the following screencast: