-
Notifications
You must be signed in to change notification settings - Fork 188
/
base_module.gradle
89 lines (75 loc) · 2.81 KB
/
base_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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//****************************************
//******** module模块的公共脚本配置 *********
//****************************************
import com.quyunshuo.androidbaseframemvvm.buildsrc.*
android {
compileSdk ProjectBuildConfig.compileSdkVersion
defaultConfig {
minSdk ProjectBuildConfig.minSdkVersion
targetSdk ProjectBuildConfig.targetSdkVersion
versionCode ProjectBuildConfig.versionCode
versionName ProjectBuildConfig.versionName
testInstrumentationRunner DependencyConfig.AndroidX.AndroidJUnitRunner
ndk {
// 设置支持的SO库架构
//abiFilters 'armeabi', 'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
buildFeatures {
viewBinding = true
}
sourceSets {
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
java {
//排除debug文件夹下的所有文件
exclude 'debug/**'
}
}
}
buildTypes {
// 对应 ALPHA 版本
debug {
buildConfigField "String", "VERSION_TYPE", "\"${ProjectBuildConfig.Version.ALPHA}\""
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
beta {
buildConfigField "String", "VERSION_TYPE", "\"${ProjectBuildConfig.Version.BETA}\""
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
release {
buildConfigField "String", "VERSION_TYPE", "\"${ProjectBuildConfig.Version.RELEASE}\""
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
kapt {
arguments {
arg("AROUTER_MODULE_NAME", project.name)
arg("eventBusIndex", "${ProjectBuildConfig.applicationId}.eventbus.index.${project.name}EventIndex")
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
api project(path: ':lib_common')
testImplementation DependencyConfig.Android.Junit
androidTestImplementation DependencyConfig.AndroidX.TestExtJunit
androidTestImplementation DependencyConfig.AndroidX.TestEspresso
implementation DependencyConfig.JetPack.HiltCore
kapt DependencyConfig.GitHub.ARouteCompiler
kapt DependencyConfig.GitHub.EventBusAPT
kapt DependencyConfig.GitHub.AutoServiceAnnotations
kapt DependencyConfig.JetPack.HiltApt
kapt DependencyConfig.JetPack.LifecycleCompilerAPT
}