Artifactory provides tight integration with Gradle. All that is needed is a simple modification of your
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:
The following sections describe the main configuration steps and provide a sample Gradle script that shows the information you need to get started using Gradle with Artifactory.
Configuring Artifact Resolution
Using the Gradle Build Script Generator
With Artifactory's Gradle Build Script Generator, you can easily create a Gradle init script that handles resolution.
In the Home tab, select Client Settings | Gradle Build Script.
Provisioning Dynamic Settings for Users
Artifactory lets you deploy and provision a dynamic settings template for your users. Once downloaded, settings are generated according to your own logic and can automatically include user authentication information.
Sample Build Script and Properties
You can download sample scripts from the JFrog GitHub public repository.
For Gradle to build your project and upload generated artifacts to Artifactory, you need to run the following command:
For more details on building your projects with Gradle, please refer to the Gradle Documentation.
Dependency Declaration Snippets
Artifactory can provide you with dependency declaration code snippets that you can simply copy into the Gradle Dependency Declaration section of your
In the Repository Browser (Artifacts tab and then Browse | Tree Browser), drill down in the repository tree and select an artifact to display the corresponding dependency declaration that you can copy into your