Upgrading Gradle from version 1.10 to latest version

We have muli-war java project and we are using gradle script to build separate RPM for each war. The build script that is doing this task is used to be compile in gradle version 1.11. Now I would like to upgrade the gradle version to the latest. When I try to compile the build.gradle script with gradle version 2.4 it is throwing below 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.

How to resolve this error? Thanks!

The version of the Artifactory plugin you are using, is using an API method that was deprecated and eventually removed in Gradle 2.0.

I don’t know whether you are applying the artifactory plugin directly or via Jenkins or another build server, but you will need to upgrade.