-
Notifications
You must be signed in to change notification settings - Fork 0
/
config_build.gradle
100 lines (82 loc) · 2.66 KB
/
config_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
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
90
91
92
93
94
95
96
97
98
99
100
/**
* 关于整个项目(app/module)的通用gradle配置
*/
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
useLibrary 'org.apache.http.legacy'
//这个是ARouter需要配置的kapt
kapt {
arguments {
arg("AROUTER_MODULE_NAME", project.getName())
}
}
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
flavorDimensions "versionCode"
ndk { //设置支持的SO库架构(开发者可以根据需要,选择一个或多个平台的so)
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86", "arm64-v8a", "x86_64"
}
}
signingConfigs {
// 签名配置
signingConfigs {
release {
storeFile file("fastFrame.jks")
storePassword "123456"
keyAlias "FastFrame"
keyPassword "123456"
}
}
}
buildTypes {
release {
buildConfigField "boolean", "IS_DEBUG", "false"// 是否是debug 不是
minifyEnabled false
shrinkResources false
zipAlignEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug{
//是否是debug 是
buildConfigField( "boolean", "IS_DEBUG", "true")
}
}
//不进行代码静态检测
lintOptions {
abortOnError false
checkReleaseBuilds false
}
//支持java8
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
//生成libs目录
sourceSets {
main.jniLibs.srcDirs = ['libs']
}
//支持@Parcelize来实现Parcelable序列化
androidExtensions {
experimental = true
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//test
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation project(path: ':lib_common')
kapt'com.alibaba:arouter-compiler:1.2.2'
}