-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
42 lines (36 loc) · 1.09 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
compile_sdk_version = 28
build_tools_version = '28.0.3'
min_sdk_version = 21 /* 5.0 */
kotlin_version = '1.3.50'
}
repositories {
jcenter()
google()
}
dependencies {
// 3.3.1 有bug, 虽然不影响运行, 但是编译报错/R无法导入, 而且会有API 'variant.getJavaCompiler()' is obsolete警告
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
jcenter()
google()
}
// 解决查看隐藏源码时替换了android.jar导致的gradle报错问题
gradle.taskGraph.whenReady {
tasks.each { task ->
if (task.name == 'mockableAndroidJar') {
task.enabled = false
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}