android studio 4.1.3 build.gradle正确配置
buildscript {ext.kotlin_version = '1.3.72'repositories {**mavenCentral()jcenter(){ url 'https://jcenter.bintray.com/'}google()**}dependencies {classpath 'com.android.tools.build:gradle:**4.0.2**'
·
buildscript {
ext.kotlin_version = '1.3.72'
repositories {
mavenCentral()
maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}
// jcenter(){ url 'https://jcenter.bintray.com/'}
google()
// jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:**4.0.2**'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
//编译时跳过test测试
gradle.taskGraph.whenReady {
tasks.each { task ->
if (task.name.contains("test"))
{
task.enabled = false
}
}
}
}
allprojects {
repositories {
mavenCentral()
maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}
// jcenter(){ url 'http://jcenter.bintray.com/'}
google()
// jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
```
更多推荐
已为社区贡献3条内容
所有评论(0)