我正在尝试使用Jenkins中的JFrog Artifactory插件,但是当我尝试构建项目时。我收到这个错误:
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'
我已经针对this和this类似问题的答案执行了所有建议,但仍然没有运气。
我使用Gradle v2.14.1,Artifactory插件v2.6.0和JFrog Artifactory v4.4.3
编辑:
这是我项目的gradle文件
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'
答案 0 :(得分:0)