-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildLib.gradle
77 lines (64 loc) · 1.81 KB
/
buildLib.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
66
67
68
69
70
71
72
73
74
75
76
77
apply {
plugin "com.android.library"
plugin "kotlin-android"
plugin 'kotlin-kapt'
plugin "kotlin-android-extensions"
}
android {
compileSdkVersion Config.compileSdkVersion
defaultConfig {
minSdkVersion Config.minSdkVersion
versionCode Config.versionCode
versionName Config.versionName
//route 获取 moduleName
javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } }
javaCompileOptions {
annotationProcessorOptions {
arguments = [moduleName: project.getName()]
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
//支持dataBinding
// dataBinding {
// enabled true
// }
//支持viewBinding
// viewBinding {
// enabled = true
// }
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
lintOptions {
abortOnError false
}
// 支持 Java JDK 8
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
GLog.l("dependenciesProjectName = " + project.name)
if (project.name.endsWith("_pkg")) {
for (def entrySet : ConfigUtils.getApplyExports().entrySet()) {
api entrySet.value.dep
}
//APT
kapt Config.depConfig.apt_compiler.dep
api Config.depConfig.apt_annotation.dep
} else if (project.name.endsWith("_export")) {
if (project.name.contains("_kotlin_")) {
// kotlin test
api Config.depConfig.lib_kt_common.dep
} else {
api Config.depConfig.lib_common.dep
}
}
}