-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodule_config.gradle
59 lines (45 loc) · 1.33 KB
/
module_config.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
//业务组件module的配置
if (isModule.toBoolean()) {
apply plugin: 'com.android.application'
} else {
apply plugin: 'com.android.library'
}
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
//这里在version.gradle中配置了
compileSdkVersion build_versions.target_sdk
buildToolsVersion '27.0.3'
//resourcePrefix "${project.getName().replaceAll("lib_", "")}_"
defaultConfig {
minSdkVersion build_versions.min_sdk
targetSdkVersion build_versions.target_sdk
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
kapt {
//Arouter
arguments {
arg("AROUTER_MODULE_NAME", project.getName())
}
}
}
sourceSets {
main {
if (isModule.toBoolean()) {
manifest.srcFile 'src/main/module/AndroidManifest.xml'
} else {
manifest.srcFile 'src/main/AndroidManifest.xml'
java {
exclude 'debug/**'//打包时忽略debug
}
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dataBinding {
enabled = true
}
}