Working with Gradle (Legacy Guidance)
Retire legacy Artifactory Gradle Plugin configuration and migrate to the current plugin.
Migrate first: Use the current Artifactory Gradle Plugin documentation for new work. Keep this page only to identify and retire version 4-era configuration.
The current Artifactory Gradle Plugin adds an artifactoryPublish task that publishes configured artifacts and build-info. Version 6 requires Gradle 8 or later and is primarily intended and tested for Gradle 9 or later.
Identifying an Older Configuration
A build is likely using the older path when it declares build-info-extractor-gradle:4.+, uses the version 4 convention DSL, or depends on configuration names and attributes removed by later plugin versions.
Migrate an Existing Build
To migrate an existing build to the current Artifactory Gradle Plugin:
-
Record the existing publication names, release and snapshot repository keys, build name, and build number.
-
Review the version 5-to-6 migration notes in the Artifactory Gradle Plugin README.
-
Update the plugin version and satisfy the current Gradle and Java prerequisites documented there.
-
Map the existing publication selection to the current
publicationsconfiguration. -
Run the publish task against a non-production repository:
./gradlew artifactoryPublish -
Compare the artifact paths and build-info with the legacy run before switching CI.
The version 4 DSL isn't a starting point for new projects. The Artifactory Gradle Plugin documentation and the plugin README are the maintained configuration references.
Troubleshooting Gradle Migration
The following table lists the symptoms you might see after a migration, their likely causes, and the action to take.
| Symptom | Likely cause | Action |
|---|---|---|
| Plugin does not load | Gradle or Java is below the selected plugin version requirement | Use the compatibility information in the current plugin README. |
artifactoryPublish has no artifacts | No publication is selected | Check the current publications configuration and Gradle publishing setup. |
| Build-info appears under an unexpected build | Build name or number changed during migration | Compare the migrated values with the recorded legacy job. |
Related Topics
Updated 12 days ago
