-
Notifications
You must be signed in to change notification settings - Fork 55
/
buildApp.gradle
64 lines (55 loc) · 1.75 KB
/
buildApp.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
apply {
plugin "com.android.application"
plugin "kotlin-android"
plugin "kotlin-android-extensions"
plugin Config.depConfig.plugin_api.pluginId
plugin Config.depConfig.plugin_bus.pluginId
}
android {
compileSdkVersion Config.compileSdkVersion
defaultConfig {
minSdkVersion Config.minSdkVersion
versionCode Config.versionCode
versionName Config.versionName
applicationId Config.applicationId + suffix
targetSdkVersion Config.targetSdkVersion
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
applicationIdSuffix ".debug"
resValue "string", "app_name", Config.appName + suffix + ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
resValue "string", "app_name", Config.appName + suffix
}
}
packagingOptions {
exclude 'META-INF/*'
}
dexOptions {
preDexLibraries true
javaMaxHeapSize "8g"
maxProcessCount 8
dexInProcess = true
}
}
dependencies {
// LeakCanary
debugImplementation Config.depConfig.leakcanary_android.dep
// 根据 Config.pkgConfig 来依赖所有 pkg
for (def entrySet : ConfigUtils.getApplyPkgs().entrySet()) {
api entrySet.value.dep
}
if (Config.depConfig.feature_mock.isApply) {
api Config.depConfig.feature_mock.dep
}
}
def getSuffix() {
if (project.name == "feature_launcher_app") return ""
return "." + project.name.substring("feature_".length(), project.name.length() - "_app".length())
}