Gradle upgrade failing to locate plugin

(Mark Jaffe) #1

I have inherited some old projects, which were originally setup with gradle-1.12; I need to add some capabilities which require gradle version 3.5, but when I run ./gradlew wrapper or even ./gradlew clean, I get this error:

Failed to apply plugin [id ‘artifactory’]
Could not find method add() for arguments [artifactoryPublish, class org.jfrog.gradle.plugin.artifactory.extractor.BuildInfoTask] on task set.

This project builds fine on gradle 1.12

(James Justinic) #2

The method add() was replaced with create() in Gradle 2.0. You will likely need to upgrade the Artifactory plugin (and most likely any other third party plugins) to a version that is compatible with changes made through 2 major version releases. For the Artifactory plugin, this should be at least 3.0.0 for the error mentioned, but there may be later changes that are also required to get to Gradle 3.5.