-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
50 lines (46 loc) · 1.5 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
43
44
45
46
47
48
buildscript {
repositories {
mavenLocal()
jcenter()
google()
}
dependencies {
if (project.hasProperty('GRADLE_3') && GRADLE_3.equalsIgnoreCase('TRUE')) {
classpath 'com.android.tools.build:gradle:4.0.0'
} else {
classpath 'com.android.tools.build:gradle:2.3.3'
}
classpath("com.tencent.tinker:tinker-patch-gradle-plugin:${TINKER_VERSION}") {
changing = TINKER_VERSION?.endsWith("-SNAPSHOT")
exclude group: 'com.android.tools.build', module: 'gradle'
}
}
configurations.all {
it.resolutionStrategy.cacheDynamicVersionsFor(5, 'minutes')
it.resolutionStrategy.cacheChangingModulesFor(0, 'seconds')
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
google()
maven { url 'https://jitpack.io' }
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
// 注意修改 jar 包的路径,替换 app/libs/hidden_api_23.jar,其他部分不要改
// Xbootclasspath/p:是 Java 编译的寻址优先设置,先找缺省路径还是全路径
options.compilerArgs.add('-Xbootclasspath/p:app/hidden/android-30.jar')
}
}
// Allow 100000 errors.
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xmaxerrs" << "30000"
}
}
}
def is_gradle_3() {
return hasProperty('GRADLE_3') && GRADLE_3.equalsIgnoreCase('TRUE')
}