-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
108 lines (89 loc) · 3.4 KB
/
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
101
102
103
104
105
106
107
108
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-parcelize'
id 'kotlin-kapt'
}
android {
compileSdk 33
defaultConfig {
applicationId "com.architecture.light.sample"
minSdk 23
targetSdk 33
versionCode 1
versionName "1.0.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
arguments = [
"room.schemaLocation" : "$projectDir/schemas".toString(),
"room.incremental" : "true",
"room.expandProjection": "true"
]
}
}
}
signingConfigs {
config {
storeFile file(StoreFile)
storePassword StorePassword
keyAlias KeyAlias
keyPassword KeyPassword
}
}
buildTypes {
debug {
buildConfigField "boolean", "IS_DEBUG", "true"
minifyEnabled false
signingConfig signingConfigs.config
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
release {
buildConfigField "boolean", "IS_DEBUG", "false"
minifyEnabled true // 开启混淆
//shrinkResources true // 开启资源压缩
//zipAlignEnabled true // k对齐
signingConfig signingConfigs.config
//proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
proguardFiles 'proguard/proguard-base.pro', 'proguard/proguard-app.pro', 'proguard/proguard-third.pro'
}
}
applicationVariants.all { variant ->
variant.outputs.all {
def app = "LightArchitectureDemo"
def build_name = "${buildType.name}"
def formattedDate = new Date().format('yyyyMMdd')
def ver = "${defaultConfig.versionName}"
outputFileName = app + "_V" + ver + "_" + formattedDate + "_" + build_name + ".apk"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation project(":architecture")
// 使用ROOM数据库需要加入编译器
kapt "androidx.room:room-compiler:2.5.1"
// implementation 'com.github.LingChenJie:LightArchitecture:v1.1.4'
// paging
implementation 'androidx.paging:paging-runtime-ktx:3.1.1'
// 上拉刷新下拉加载框架:https://github.com/scwang90/SmartRefreshLayout
implementation 'com.scwang.smart:refresh-layout-kernel:2.0.3'
implementation 'com.scwang.smart:refresh-header-material:2.0.3'
// 标题栏
implementation 'com.github.getActivity:TitleBar:9.2'
// 图片加载框架:https://github.com/bumptech/glide
// 官方使用文档:https://github.com/Muyangmin/glide-docs-cn
implementation 'com.github.bumptech.glide:glide:4.14.2'
kapt 'com.github.bumptech.glide:compiler:4.14.2'
debugImplementation 'com.guolindev.glance:glance:1.1.0'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}