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:

  1. Record the existing publication names, release and snapshot repository keys, build name, and build number.

  2. Review the version 5-to-6 migration notes in the Artifactory Gradle Plugin README.

  3. Update the plugin version and satisfy the current Gradle and Java prerequisites documented there.

  4. Map the existing publication selection to the current publications configuration.

  5. Run the publish task against a non-production repository:

    ./gradlew artifactoryPublish
  6. 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.

SymptomLikely causeAction
Plugin does not loadGradle or Java is below the selected plugin version requirementUse the compatibility information in the current plugin README.
artifactoryPublish has no artifactsNo publication is selectedCheck the current publications configuration and Gradle publishing setup.
Build-info appears under an unexpected buildBuild name or number changed during migrationCompare the migrated values with the recorded legacy job.

Related Topics


Did this page help you?