-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodule.gradle
57 lines (49 loc) · 1.69 KB
/
module.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
boolean isCommonModule = project.getName() == "module_common"
if (isModule.toBoolean() && !isCommonModule) {
apply plugin: 'com.android.application'
} else {
apply from: "../aar.gradle"
apply plugin: 'com.android.library'
}
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
buildToolsVersion rootProject.ext.android.buildToolsVersion
dataBinding {
enabled true
}
defaultConfig {
if (isModule.toBoolean() && !isCommonModule)
applicationId rootProject.ext.android.applicationId
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
versionCode rootProject.ext.android.versionCode
versionName rootProject.ext.android.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
}
sourceSets {
main {
if (isModule.toBoolean() && !isCommonModule) {
manifest.srcFile 'src/main/module/AndroidManifest.xml'
java {
//全部Module一起编译的时候剔除debug目录
exclude '**/debug/**'
}
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}