Working with Gradle

JFrog Integrations Documentation

Content Type
Integrations
ft:sourceType
Paligo

Artifactory provides tight integration with Gradle. All that is needed is a simple modification of your build.gradle script file with a few configuration parameters.

Both the new and older publishing mechanisms of Gradle are supported, however some of the steps to configure the Gradle Artifactory Plugin depend on the version you are using, and these are detailed in the documentation pages.

The Gradle Artifactory Plugin can be used whether you are running builds using a CI server, or running standalone builds. In either case, you should note the following points:

  1. CI Server IntegrationWhen running Gradle builds in your continuous integration server, we recommend using one of the Artifactory Plugins for Jenkins, TeamCity or Bamboo.

    You can use your build server UI to configure resolving and publishing artifacts through Artifactory to capture exhaustive build information.

  2. Standalone Integration

    The Gradle Artifactory plugin offers a simple DSL to perform the following steps in your Gradle build:

    1. Define the default dependency resolution from Artifactory.

    2. Define configurations that publish artifacts to Artifactory after a full (multi-module) successful build.

    3. Define properties that should be attached to published artifacts in Artifactory metadata.

    4. Capture and publish a build-info object to the Artifactory build-info REST API to provide a fully traceable build context.

Source Code Available!

This Gradle Artifactory Plugin is an open source project on GitHub which you can freely browse and fork.

Integration Benefits JFrog Artifactory and Gradle Repositories

How to set up a Private, Remote and Virtual Maven/Gradle Registry