-
Notifications
You must be signed in to change notification settings - Fork 458
/
module.build.gradle
65 lines (60 loc) · 1.95 KB
/
module.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
if (isBuildModule.toBoolean()) {
//作为独立App应用运行
apply plugin: 'com.android.application'
} else {
//作为组件运行
apply plugin: 'com.android.library'
}
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
buildToolsVersion rootProject.ext.android.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
versionCode rootProject.ext.android.versionCode
versionName rootProject.ext.android.versionName
consumerProguardFiles 'consumer-rules.pro'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
}
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main{
//jni库统一放在libs目录下
// jniLibs.srcDir = ['libs']
if (isBuildModule.toBoolean()){
//单独运行
manifest.srcFile 'src/main/alone/AndroidManifest.xml'
}
else {
//合并到宿主中
manifest.srcFile 'src/main/AndroidManifest.xml'
resources{
//正式版本时.剔除debug文件夹下的所有调式文件
exclude 'src/debug/*'
}
}
}
}
//开启dataBinding
dataBinding{
enabled true
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}