1. 程式人生 > >gradle重復依賴終極方案解決辦法

gradle重復依賴終極方案解決辦法

mod robot oid 依賴 scrip 解決 方案 ever port

buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath ‘com.android.tools.build:gradle:3.1.3‘
classpath ‘org.greenrobot:greendao-gradle-plugin:3.2.1‘
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()
}

subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == ‘com.android.support‘
&& !details.requested.name.contains(‘multidex‘) ) {
details.useVersion "25.4.0"
}
}
}
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

gradle重復依賴終極方案解決辦法