🐸
JFrog Applications
  • JFrog Applications
  • JFrog Applications
    • JFrog CLI
      • Download and Install
      • Authentication
      • Shell Auto Completion
      • Usage
      • Configurations
        • JFrog Platform Configuration
        • Proxy Support
      • CLI AI Assistant
        • AI Assistant Addendum
      • Binaries Management with JFrog Artifactory
        • Environment Variables
        • Authentication
        • Verifying Artifactory's Accessibility
        • Generic Files
        • Using File Specs
        • Using Placeholders
        • Build Integration
        • Package Managers Integration
        • Storing Symlinks in Artifactory
        • cURL Integration
        • Managing Configuration Entities
        • Release Lifecycle Management
        • Transferring Files Between Artifactory Servers
        • Cleaning Up Unreferenced Files from a Git LFS Repository
        • Evidence Service
      • CLI for JFrog Security
        • Download Updates for Xray's Database
        • How Tos
          • Scan your code dependencies
          • Scan your Binaries
          • Enrich your SBOM JSONs & XMLs
          • JFrog Curation
          • Scan Published Builds
          • Count Contributing Developers
      • CLI for JFrog Distribution
      • CLI for JFrog Cloud Transfer
      • CLI Command Summaries
      • JFrog CLI Plugins
        • JFrog CLI Plugins Developer Guide
    • IDE
      • Visual Studio Code
        • VS Code Prerequsites Per Language
        • Supported Technologies
        • Install the JFrog VS Code Extension
          • Connect VS Code to the JFrog Platform
        • Manage VS Code IDE
        • Quick Start
        • How Tos
          • Analyze your Results
            • Resolve Issues
            • Ignore Findings
      • JetBrains IDEs
        • Supported Technologies
        • Install the JFrog IDEA Plugin
        • Connect the JFrog Plugin to the JFrog Platform
        • Using the JFrog Plugin in the JetBrains IDEs
        • Plugin Configuration
        • Apply Xray Policies and Watches
        • Troubleshooting
      • Eclipse
        • Supported Technologies
        • Install and Setup of the JFrog Eclipse IDE Plugin
        • Scan Gradle Projects with the JFrog Eclipse IDE Plugin
        • Use the JFrog Eclipse IDE Plugin
      • Visual Studio
        • Supported Technologies
        • Install and Setup the JFrog Visual Studio Extension
        • Use the JFrog Visual Studio Extension
    • JFrog Frogbot
      • Supported Technologies
      • Setup
        • Frogbot Configuration
        • Setup Frogbot Using GitHub Actions
          • OIDC Authentication
          • Scan Git Repository Full Template
          • Scan Pull Request Full Template
        • Setup Frogbot Using Jenkins
        • Setup Frogbot Using JFrog Pipelines
        • Setup Frogbot Using GitLab CI
          • GitLab Full Template
        • Setup Frogbot Using Azure Pipelines
      • Scan Execution
        • Scan Git Repositories
          • View Security Alerts on GitHub
        • Scan Pull Requests
          • Scan GitHub Pull Request
          • Scan GitLab Pull Request
          • Scan Azure Repos Pull Request
          • Scan Bitbucket Server Pull Request
          • Pull Request Scan Results
      • Frogbot Badge
  • CI & SDKs
    • CI Integrations
      • Maven Artifactory Plugin
      • GitLab Templates for JFrog
      • Jenkins JFrog Plugin
      • Bamboo JFrog Plugin
      • GitHub Actions
      • Artifactory Gradle Plugin
    • SDKs
      • Artifactory Java Client
      • JFrog Go Client
  • JFrog Security Features
    • SCA
    • Contextual Analysis
    • Infrastructure as Code (IaC)
    • Secrets
    • SAST
      • Integrations
      • Ignore Findings
Powered by GitBook

© 2024 JFrog Ltd All Rights Reserved

On this page
  • Overview
  • 📦 Installation
  • 🚀 Usage
  • 💡 Examples
  • 🐞 Reporting Issues
  • 🫱🏻‍🫲🏼 Contributions
Edit on GitHub
Export as PDF
  1. CI & SDKs
  2. CI Integrations

Artifactory Gradle Plugin

PreviousGitHub ActionsNextSDKs

Last updated 1 year ago

Overview

The Gradle Artifactory Plugin provides tight integration with Gradle. All that is needed is a simple modification of your build.gradle script file with a few configuration parameters, and you can deploy your build artifacts and build information to Artifactory.

The plugin adds the artifactoryPublish task for each project, in the publishing group. The task performs the following actions on the project and its submodules:

  1. Extracting the file located in the root project. This file contains comprehensive information about the build, such as its configuration, dependencies, and other relevant details.

  2. Deploying both the generated artifacts and the build-info file to your Artifactory repository. This ensures that the artifacts, which are the output of the build process, and the accompanying build-info file are stored and organized in your Artifactory repository for easy access and management.

NOTE: The minimum supported Gradle version to use this plugin is v6.9

🚚 Migrating from Version 4 to Version 5 of the Plugin

Version 5 of the Gradle Artifactory Plugin includes the following breaking changes compared to version 4

  • The minimum version of Gradle required to use this plugin has been upgraded to version 6.9.

  • The below convention attributes have been removed:

    Attribute
    Migration action

    parent

    No longer supported.

    resolve


📦 Installation

Step 1 - Add the plugin to your project

Add the following snippet to your build script:


Step 2 - Configure the plugin with your Artifactory

To configure the plugin with your Artifactory, add the following basic snippet to your project root build script, and make the necessary adjustments based on your platform information:

⚙️ Advance Configurations

For advanced configurations and finer control over the plugin's operations, refer to the following documentation that outlines all the available configuration options. These options allow you to customize the behavior of the plugin according to your specific needs.


🚀 Usage

To deploy the project artifacts and build info to Artifactory, execute the following Gradle task

./gradlew artifactoryPublish

💡 Examples

The following are links to the build scripts of different types of projects that are configured to use the plugin.

Multi Modules Project (Groovy)

Sample project that uses the Gradle Artifactory Plugin with Gradle Publications.

Multi Modules Project (Kotlin)

Sample project that configures the Gradle Artifactory Plugin with the Gradle Kotlin DSL.


🐞 Reporting Issues

We highly recommend running Gradle with the -d option to get useful and readable debug information if something goes wrong with your build.


🫱🏻‍🫲🏼 Contributions

We welcome pull requests from the community. To help us improve this project, please read our Contribution guide.

To define the Artifactory resolution repositories for your build, declare the repositories under the repositories section as described .

We highly recommend also using our as a reference when configuring your build scripts.

Please help us improve the plugin by you encounter.

build-info
gradle project examples
reporting any issues
here