{"id":23116098,"url":"https://github.com/jfrog/artifactory-gradle-plugin","last_synced_at":"2025-08-01T19:31:47.473Z","repository":{"id":166854336,"uuid":"637853064","full_name":"jfrog/artifactory-gradle-plugin","owner":"jfrog","description":"JFrog Gradle plugin for Build Info extraction and Artifactory publishing.","archived":false,"fork":false,"pushed_at":"2025-07-18T10:55:02.000Z","size":321,"stargazers_count":23,"open_issues_count":27,"forks_count":19,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-07-18T14:39:38.690Z","etag":null,"topics":["artifactory","gradle","gradle-plugin","java","jfrog"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jfrog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-05-08T14:47:04.000Z","updated_at":"2025-07-18T10:55:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"3a0b0a0b-d9d7-482b-82b5-45dabe069a8c","html_url":"https://github.com/jfrog/artifactory-gradle-plugin","commit_stats":null,"previous_names":["jfrog/artifactory-gradle-plugin"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/jfrog/artifactory-gradle-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfrog%2Fartifactory-gradle-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfrog%2Fartifactory-gradle-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfrog%2Fartifactory-gradle-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfrog%2Fartifactory-gradle-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jfrog","download_url":"https://codeload.github.com/jfrog/artifactory-gradle-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfrog%2Fartifactory-gradle-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268285704,"owners_count":24225777,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artifactory","gradle","gradle-plugin","java","jfrog"],"created_at":"2024-12-17T04:11:07.674Z","updated_at":"2025-08-01T19:31:47.443Z","avatar_url":"https://github.com/jfrog.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://github.com/jfrog/artifactory-gradle-plugin/assets/29822394/151248d7-8e7b-4bae-98ff-9fd4976e5e8d)](#readme)\n\n\u003cdiv align=\"center\"\u003e\n\n# 🐸 Artifactory Gradle Plugin 🐘\n\n\u003c/div\u003e\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n[![Test](https://github.com/jfrog/artifactory-gradle-plugin/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/jfrog/artifactory-gradle-plugin/actions/workflows/test.yml?query=branch%3Amain)\n[![Test](https://github.com/jfrog/artifactory-gradle-plugin/actions/workflows/gradle.yml/badge.svg?branch=main)](https://github.com/jfrog/artifactory-gradle-plugin/actions/workflows/gradle.yml??query=branch%3Amain)\n[![Scanned by Frogbot](https://raw.github.com/jfrog/frogbot/master/images/frogbot-badge.svg)](https://github.com/jfrog/frogbot#readme)\n\n\u003c/div\u003e\n\n---\n\n## Table of Contents\n\n- [📚 Overview](#-overview)\n- [📦 Installation](#-installation)\n- [🚀 Usage](#-usage)\n- [💡 Examples](#-examples)\n- [🐞 Reporting Issues](#-reporting-issues)\n- [🫱🏻‍🫲🏼 Contributions](#-contributions)\n\n---\n\n## 📚 Overview\n\nThe Gradle Artifactory Plugin provides tight integration with Gradle. All that is needed is a simple modification of\nyour `build.gradle` script file with a few configuration parameters, and you can deploy your build artifacts and build\ninformation to Artifactory.\n\nThe plugin adds the `artifactoryPublish` task for each project, in the 'publishing' group. The task performs the\nfollowing actions on the project and its submodules:\n\n1. Extracting the [build-info](https://www.buildinfo.org/) file located in the root project. This file contains\n   comprehensive information about the build, such as its configuration, dependencies, and other relevant details.\n2. Deploying both the generated artifacts and the build-info file to your Artifactory repository. This ensures that the\n   artifacts, which are the output of the build process, and the accompanying build-info file are stored and organized\n   in your Artifactory repository for easy access and management.\n\n\u003e **_NOTE:_** The minimum supported Gradle version to use this plugin is v9\n\n\u003cdetails\u003e\n\u003csummary\u003e 🚚 Migrating from Version 5 to Version 6 of the Plugin\u003c/summary\u003e\n\n---\n\n#### Version 6 of the Gradle Artifactory Plugin includes the following breaking changes compared to version 5\n\n* The minimum version of Gradle required to use this plugin is version 8.\n* The below convention attributes have been removed:\n\n  |  Attribute  | Migration action                                                                                                                                                                                                                             |\n  |:-----------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n  | web-archive | Now produces two archives, JAR as well as WAR.                                                                                                                                                                                               |\n\n\n\u003c/details\u003e\n\n---\n\n## 📦 Installation\n\n\u003cdetails\u003e\n\n\u003csummary\u003eStep 1 - Add the plugin to your project\u003c/summary\u003e\n\n---\n\nAdd the following snippet to your build script:\n\n\u003cdetails open\u003e\n\u003csummary\u003eKotlin Format\u003c/summary\u003e\n\n```kotlin\nplugins {\n    id(\"com.jfrog.artifactory\") version \"5.+\"\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGroovy Format\u003c/summary\u003e\n\n```groovy\nplugins {\n    id \"com.jfrog.artifactory\" version \"5.+\"\n}\n```\n\n\u003c/details\u003e\n\n---\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003eStep 2 - Configure the plugin with your Artifactory\u003c/summary\u003e\n\n---\n\nTo configure the plugin with your Artifactory, add the following basic snippet to your project root build script, and\nmake the necessary adjustments based on your platform information:\n\n\u003cdetails open\u003e\n\u003csummary\u003eKotlin Format\u003c/summary\u003e\n\n```kotlin\nconfigure\u003cArtifactoryPluginConvention\u003e {\n    publish {\n        // Define the Artifactory URL for publishing artifacts\n        contextUrl = \"http://127.0.0.1:8081/artifactory\"\n        // Define the project repository to which the artifacts will be published\n        repository {\n            // Set the Artifactory repository key\n            repoKey = \"libs-snapshot-local\"\n            // Specify the publisher username\n            username = project.property(\"artifactory_user\") as String\n            // Provide the publisher password\n            password = project.property(\"artifactory_password\") as String\n        }\n\n        // Include all configured publications for all the modules\n        defaults {\n            publications(\"ALL_PUBLICATIONS\")\n        }\n    }\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGroovy Format\u003c/summary\u003e\n\n```groovy\nartifactory {\n    publish {\n        // Define the Artifactory URL for publishing artifacts\n        contextUrl = 'http://127.0.0.1:8081/artifactory'\n        // Define the project repository to which the artifacts will be published\n        repository {\n            // Set the Artifactory repository key\n            repoKey = 'libs-snapshot-local'\n            // Specify the publisher username\n            username = \"${artifactory_user}\"\n            // Provide the publisher password\n            password = \"${artifactory_password}\"\n        }\n\n        // Include all configured publications for all the modules\n        defaults {\n            publications('ALL_PUBLICATIONS')\n        }\n    }\n}\n```\n\n\u003c/details\u003e\n\n### ⚙️ Advance Configurations\n\nFor advanced configurations and finer control over the plugin's operations, refer to the following documentation that\noutlines all the available configuration options. These options allow you to customize the behavior of the plugin\naccording to your specific needs.\n\n\u003cdetails\u003e\n\u003csummary\u003e🏢🔧 Artifactory Configurations\u003c/summary\u003e\n\n---\n\nThe provided code snippet showcases the configuration options for the Artifactory plugin. It demonstrates how to\nfine-tune the plugin's behavior to meet specific project requirements, access the Artifactory instance to which the\nartifacts will be published, and configure other global settings such as Proxy and Build-Info extraction configurations.\n\n\u003cdetails open\u003e\n\u003csummary\u003eKotlin Format\u003c/summary\u003e\n\n```kotlin\nconfigure\u003cArtifactoryPluginConvention\u003e {\n    publish {\n        // Define the Artifactory URL for publishing artifacts\n        contextUrl = \"http://127.0.0.1:8081/artifactory\"\n        // Define the project repository to which the artifacts will be published\n        repository {\n            // Option 1 - Define the Artifactory repository key\n            repoKey = \"libs-snapshot-local\"\n            // Option 2 - Specify release and snapshot repositories; let the plugin decide to which one to publish\n            // releaseRepoKey = \"libs-release-local\"\n            // snapshotRepoKey = \"libs-snapshot-local\"\n\n            // Specify the publisher username\n            username = project.property(\"artifactory_user\") as String\n            // Provide the publisher password\n            password = project.property(\"artifactory_password\") as String\n\n            // This is an optional section (relevant only when publishIvy = true) for configuring Ivy publication.\n            ivy {\n                ivyLayout = \"[organization]/[module]/ivy-[revision].xml\"\n                artifactLayout = \"[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]\"\n                // Convert any dots in an [organization] layout value to path separators, similar to Maven's groupId-to-path conversion. True if not specified\n                mavenCompatible = true\n            }\n        }\n\n        // Optionally, you can specify global configurations. These configurations will be added for all projects instead of configuring them for each project.\n        defaults {\n            // artifactoryPublish task attributes...\n        }\n\n        // (default: true) Publish the generated build-info file to Artifactory\n        publishBuildInfo = false\n        // (default: 3) Number of threads that will work and deploy artifacts to Artifactory\n        forkCount = 5\n    }\n\n    // Optionally, configure and control the information and attributes of the generated build-info file.\n    // Alternatively, you can configure the attributes by using the `clientConfig.info` object.\n    buildInfo {\n        // Set specific build and project information for the build-info\n        buildName = \"new-strange-name\"\n        buildNumber = \"\" + Random(System.currentTimeMillis()).nextInt(20000)\n        project = \"project-key\"\n        // Add a dynamic property to the build-info\n        addEnvironmentProperty(\"test.adding.dynVar\", Date().toString())\n        // Generate a copy of the build-info.json file in the following path\n        generatedBuildInfoFilePath = \"/Users/gradle-example-publish/myBuildInfoCopy.json\"\n        // Generate a file with all the deployed artifacts' information in the following path\n        deployableArtifactsFilePath = \"/Users/gradle-example-publish/myArtifactsInBuild.json\"\n    }\n\n    // Optionally, you can use and configure your proxy information to use in the task.\n    // Alternatively, you can configure the attributes by using the clientConfig.proxy object.\n    proxy {\n        host = \"ProxyHost\"\n        port = 60\n        username = \"ProxyUserName\"\n        password = \"ProxyPassword\"\n    }\n\n    // (default: 300 seconds) Artifactory's connection timeout (in seconds).\n    clientConfig.timeout = 600\n    // (default: 0 retries) Artifactory's connection retires\n    clientConfig.connectionRetries = 4\n    // (default: false) Set to true to skip TLS certificates verification.\n    clientConfig.insecureTls = false\n    // (default: false) Set to true to include environment variables while running the tasks\n    clientConfig.isIncludeEnvVars = true\n    // Set patterns of environment variables to include/exclude while running the tasks\n    clientConfig.envVarsExcludePatterns = \"*password*,*secret*\"\n    clientConfig.envVarsIncludePatterns = \"*not-secret*\"\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGroovy Format\u003c/summary\u003e\n\n```groovy\nartifactory {\n    publish {\n        // Define the Artifactory URL to publish the artifacts\n        contextUrl = 'http://127.0.0.1:8081/artifactory'\n        // Define the project repository to which the artifacts will be published\n        repository {\n            // Option 1 - Define the Artifactory repository key\n            repoKey = 'libs-snapshot-local'\n            // Option 2 - Specify release and snapshot repositories; let the plugin decide to which one to publish\n            // releaseRepoKey = 'libs-release-local'\n            // snapshotRepoKey = 'libs-snapshot-local'\n            \n            // The publisher username\n            username = \"${artifactory_user}\"\n            // The publisher password\n            password = \"${artifactory_password}\"\n\n            // This is an optional section (relevant only when publishIvy = true) for configuring Ivy publication.\n            ivy {\n                ivyLayout = '[organization]/[module]/ivy-[revision].xml'\n                artifactLayout = '[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]'\n                //Convert any dots in an [organization] layout value to path separators, similar to Maven's groupId-to-path conversion. True if not specified\n                mavenCompatible = true\n            }\n        }\n\n        // Optionally, you can specify global configurations. These configurations will be added for all projects instead of configuring them for each project.\n        defaults {\n            // artifactoryPublish task attributes...\n        }\n\n        // (default: true) Publish the generated build-info file to Artifactory\n        publishBuildInfo = false\n        // (default: 3) Number of threads that will work and deploy artifacts to Artifactory\n        forkCount = 5\n    }\n\n    // Optionally, configure and control the information and attributes of the generated build-info file.\n    // Alternatively, you can configure the attributes by using the `clientConfig.info` object.\n    buildInfo {\n        // Set specific build and project information for the build-info\n        setBuildName('new-strange-name')\n        setBuildNumber('' + new Random(System.currentTimeMillis()).nextInt(20000))\n        setProject('project-key')\n        // Add a dynamic property to the build-info\n        addEnvironmentProperty('test.adding.dynVar', new java.util.Date().toString())\n        // Generate a copy of the build-info.json file in the following path\n        setGeneratedBuildInfoFilePath(\"/Users/gradle-example-publish/myBuildInfoCopy.json\")\n        // Generate a file with all the deployed artifacts' information in the following path\n        setDeployableArtifactsFilePath(\"/Users/gradle-example-publish/myArtifactsInBuild.json\")\n    }\n\n    // Optionally, you can use and configure your proxy information to use in the task.\n    // Alternatively, you can configure the attributes by using the clientConfig.proxy object.\n    proxy {\n        host = \"ProxyHost\"\n        port = 60\n        username = \"ProxyUserName\"\n        password = \"ProxyPassword\"\n    }\n\n    // (default: 300 seconds) Artifactory's connection timeout (in seconds).\n    clientConfig.timeout = 600\n    // (default: 0 retries) Artifactory's connection retires\n    clientConfig.setConnectionRetries(4)\n    // (default: false) Set to true to skip TLS certificates verification.\n    clientConfig.setInsecureTls(false)\n    // (default: false) Set to true to include environment variables while running the tasks\n    clientConfig.setIncludeEnvVars(true)\n    // Set patterns of environment variables to include/exclude while running the tasks\n    clientConfig.setEnvVarsExcludePatterns('*password*,*secret*')\n    clientConfig.setEnvVarsIncludePatterns('*not-secret*')\n}\n```\n\n\u003c/details\u003e\n\n\n---\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003e📋🔧 Project Publication Configurations\u003c/summary\u003e\n\n---\n\nThe `artifactoryPublish` task configuration allows you to customize the task operation and behavior for a specific\nproject, in addition to the global defaults. The global defaults configuration applies to the project and its\nsubmodules, while the artifactoryPublish configuration allows you to define additional settings specifically for the\nproject.\nWhen using artifactoryPublish, you have the flexibility to configure additional values without overriding the global\ndefaults. This means that the project can have its own specific configuration in addition to the common settings applied\nglobally.\n\n\u003cdetails open\u003e\n\u003csummary\u003eKotlin Format\u003c/summary\u003e\n\n```kotlin\ntasks.named\u003cArtifactoryTask\u003e(\"artifactoryPublish\") {\n    // Specify what publications to include when collecting artifacts for publishing to Artifactory\n    publications(\n            // Publication can be specified as an Object\n            publishing.publications[\"ivyJava\"],\n            // Publication can be specified as a String\n            \"mavenJava\",\n            // If this plugin constant string is specified, the plugin will try to apply all the known publications\n            \"ALL_PUBLICATIONS\"\n    )\n\n    // Optionally, configure properties to be attached to the published artifacts.\n    setProperties(mapOf(\n            \"key1\" to \"value1\",\n            \"key2\" to \"value2\"\n    ))\n    // (default: false) Skip this task for the project (don't include its artifacts when publishing)\n    skip = true\n    // (default: true) Publish generated artifacts to Artifactory, can be specified as boolean/string\n    setPublishArtifacts(false)\n    // (default: true) Publish generated POM files to Artifactory, can be specified as boolean/string\n    setPublishPom(false)\n    // (default: true) Publish generated Ivy descriptor files to Artifactory, can be specified as boolean/string\n    setPublishIvy(false)\n    // (default: 'GRADLE') Set a custom module type for the published module in the build-info. \n    // Acceptable values: 'GENERIC', 'MAVEN', 'GRADLE', 'IVY', 'DOCKER', 'NUGET', 'NPM', 'GO', 'PYPI', 'CPP'\n    setModuleType(\"GRADLE\")\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGroovy Format\u003c/summary\u003e\n\n```groovy\nartifactoryPublish {\n    publications('ALL_PUBLICATIONS')\n\n    properties = ['qa.level': 'basic', 'dev.team': 'core']\n    // In Groovy format, properties can also be defined with a closure in the format: configName artifactSpec, key1:val1, key2:val2\n    properties {\n        simpleFile '**:**:**:*@*', simpleFile: 'only on settings file'\n    }\n\n    skip = true\n    publishArtifacts = false\n    publishPom = false\n    publishIvy = false\n    moduleType = 'GRADLE'\n}\n```\n\n\u003c/details\u003e\n\n\u003c/details\u003e\n\n\u003c/details\u003e\n\n---\n\n## 🚀 Usage\n\nTo deploy the project artifacts and build info to Artifactory, execute the following Gradle task\n\n```bash\n./gradlew artifactoryPublish\n```\n\n---\n\n## 💡 Examples\n\nThe following are links to the build scripts of different types of projects that are configured to use the plugin.\n\n#### [Multi Modules Project (Groovy)](./src/functionalTest/resources/gradle-example-publish/build.gradle)\n\nSample project that uses the Gradle Artifactory Plugin with Gradle Publications.\n\n#### [Multi Modules Project (Kotlin)](./src/functionalTest/resources/gradle-kts-example-publish/build.gradle.kts)\n\nSample project that configures the Gradle Artifactory Plugin with the Gradle Kotlin DSL.\n\nWe highly recommend also using\nour [gradle project examples](https://github.com/JFrog/project-examples/tree/master/gradle-examples?_gl=1*pgsvlz*_ga*MTc3OTI0ODE4NS4xNjYyMjgxMjI1*_ga_SQ1NR9VTFJ*MTY4NTM2OTcwMC4yNi4wLjE2ODUzNjk3MDAuNjAuMC4w)\nas a reference when configuring your build scripts.\n\n---\n\n## 🐞 Reporting Issues\n\nWe highly recommend running Gradle with the ```-d```\noption to get useful and readable debug information if something goes wrong with your build.\n\nPlease help us improve the plugin\nby [reporting any issues](https://github.com/jfrog/artifactory-gradle-plugin/issues/new/choose) you encounter.\n\n---\n\n## 🫱🏻‍🫲🏼 Contributions\n\nWe welcome pull requests from the community. To help us improve this project, please read\nour [Contribution](./CONTRIBUTING.md#-guidelines) guide.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfrog%2Fartifactory-gradle-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjfrog%2Fartifactory-gradle-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfrog%2Fartifactory-gradle-plugin/lists"}