---
updatedAt: 2026-09-21T06:15:47.000Z
agentTools:
  siteIndex: https://docs.jfrog.com/llms.txt
  projectIndex: https://docs.jfrog.com/integrations/llms.txt
---

# 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](/docs/artifactory-gradle-plugin) 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](https://github.com/jfrog/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:

   ```shell
   ./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](/docs/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

* [Artifactory Gradle Plugin](/docs/artifactory-gradle-plugin)
* [Build Integration](/docs/build-integration)
* [About Build Info](/docs/about-build-info)
* [Inspect Builds](/docs/inspect-builds)
* [Manage Builds](/docs/manage-builds)