-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbuild.gradle
65 lines (54 loc) · 1.45 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
buildscript {
apply from: 'versions.gradle'
addRepos(repositories)
dependencies {
classpath deps.android_gradle_plugin
classpath deps.tinker.gradle_plugin
classpath deps.kotlin.plugin
classpath deps.navigation.gradle_plugin
classpath 'com.meituan.android.walle:plugin:1.1.6'
}
ext.libDefaultConfig = {
minSdkVersion build_versions.min_sdk
targetSdkVersion build_versions.target_sdk
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath = true
}
}
}
}
allprojects {
addRepos(repositories)
}
task clean(type: Delete) {
delete rootProject.buildDir
}
repositories {
google()
jcenter()
}
//分包配置
afterEvaluate {
tasks.matching {
it.name.startsWith('dex')
}.each { dx ->
if (dx.additionalParameters == null) {
dx.additionalParameters = []
}
dx.additionalParameters += '--multi-dex'
dx.additionalParameters += "--main-dex-list=$projectDir/dex_files".toString()
}
}
// 项目的 build.gradle 中配置组件是否独立运行
ext {
login_isSingleCompile = false
splash_isSingleCompile = false
user_isSingleCompile = false
main_isSingleCompile = false
search_isSingleCompile = false
menu_isSingleCompile = false
update_isSingleCompile = false
pay_isSingleCompile =false
shopping_isSingleCompile =false
}