I am trying to use the JFrog Artifactory plugin in Jenkins but when I try to build the project. I get this error:
Failed to apply plugin [id 'com.jfrog.artifactory'] Cannot cast object
'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention@2f54f83b'
with class 'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention' to class
'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention'
I have already performed all the suggestions from answers to this and this similar questions, but still no luck.
I use Gradle v2.14.1, Artifactory plugin v2.6.0 and JFrog Artifactory v4.4.3
Edit:
this is the gradle file for my project
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:1.2"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.4.3"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
TAG = "v" + "$VERSION_NAME" + "#" + String.format("%06d", Integer.parseInt("$VERSION_CODE"))
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply from: 'sonar.gradle'