-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdependencies.gradle
268 lines (223 loc) · 9.2 KB
/
dependencies.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-parcelize'
android {
def DEV_API_URL = "\"https://dev.app.wondertemple.com\""
def STAG_API_URL = "\"https://stage.app.wondertemple.com\""
def GRAY_API_URL = "\"https://grey.app.wondertemple.com\""
def OFF_API_URL = "\"https://app.wondertemple.com\""
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
versionCode rootProject.versionCode
versionName rootProject.versionName
buildConfigField("String", "BASE_API", "${OFF_API_URL}")
multiDexEnabled = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildFeatures {
viewBinding true
}
signingConfigs {
releaseConfig {
storeFile file("../app.keystore")
storePassword "111111"
keyAlias "app"
keyPassword "111111"
}
}
buildTypes {
debug {
manifestPlaceholders = [
APP_CHANNEL : "officialwebsite",
JPUSH_PKGNAME: rootProject.applicationId,
]
signingConfig signingConfigs.releaseConfig
debuggable true
minifyEnabled false
zipAlignEnabled false
// 移除无用的resource文件
shrinkResources false
buildConfigField 'String', 'envir', '"dev"'
buildConfigField("String", "BASE_API", "${DEV_API_URL}")
}
stagdebug {
manifestPlaceholders = [
APP_CHANNEL : "officialwebsite",
JPUSH_PKGNAME: rootProject.applicationId,
]
signingConfig signingConfigs.releaseConfig
debuggable true
minifyEnabled false
zipAlignEnabled false
// 移除无用的resource文件
shrinkResources false
buildConfigField 'String', 'envir', '"stagre"'
buildConfigField("String", "BASE_API", "${STAG_API_URL}")
}
stagrelease {
manifestPlaceholders = [
APP_CHANNEL : "officialwebsite",
JPUSH_PKGNAME: rootProject.applicationId,
]
signingConfig signingConfigs.releaseConfig
debuggable true
minifyEnabled true
zipAlignEnabled true
// 移除无用的resource文件
shrinkResources false
buildConfigField 'String', 'envir', '"stagre"'
buildConfigField("String", "BASE_API", "${STAG_API_URL}")
}
graydebug {
manifestPlaceholders = [
APP_CHANNEL : "officialwebsite",
JPUSH_PKGNAME: rootProject.applicationId,
]
signingConfig signingConfigs.releaseConfig
debuggable true
minifyEnabled false
zipAlignEnabled false
// 移除无用的resource文件
shrinkResources false
buildConfigField 'String', 'envir', '"off"'
buildConfigField("String", "BASE_API", "${GRAY_API_URL}")
}
offdebug {
manifestPlaceholders = [
APP_CHANNEL : "officialwebsite",
JPUSH_PKGNAME: rootProject.applicationId,
]
signingConfig signingConfigs.releaseConfig
debuggable true
minifyEnabled false
zipAlignEnabled false
// 移除无用的resource文件
shrinkResources false
buildConfigField 'String', 'envir', '"off"'
buildConfigField("String", "BASE_API", "${OFF_API_URL}")
}
release {
manifestPlaceholders = [
APP_CHANNEL : "officialwebsite",
JPUSH_PKGNAME: rootProject.applicationId,
]
signingConfig signingConfigs.releaseConfig
debuggable false
minifyEnabled true
zipAlignEnabled true
// 移除无用的resource文件
shrinkResources false
buildConfigField 'String', 'envir', '"off"'
buildConfigField("String", "BASE_API", "${OFF_API_URL}")
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
kotlinOptions {
// work-runtime-ktx 2.1.0 and above now requires Java 8
jvmTarget = rootProject.jvmTarget
// Enable Coroutines and Flow APIs 开启协程的使用
freeCompilerArgs += "-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
freeCompilerArgs += "-Xopt-in=kotlinx.coroutines.FlowPreview"
}
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
dependencies {
//*********************基本组件***********************
// kotlin 版本
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.7.0"
implementation "org.jetbrains.kotlin:kotlin-reflect:1.7.0"
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'com.google.android.material:material:1.4.0'
implementation "androidx.appcompat:appcompat:1.3.1"
implementation "androidx.constraintlayout:constraintlayout:2.1.0"
implementation "androidx.fragment:fragment-ktx:1.3.5"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.4.0-alpha01"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0-alpha01"
implementation "androidx.lifecycle:lifecycle-process:2.4.0-alpha01"
implementation "androidx.lifecycle:lifecycle-service:2.4.0-alpha01"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.4.0-alpha01"
implementation "androidx.viewpager2:viewpager2:1.0.0"
implementation "com.google.code.gson:gson:2.8.5"
// 状态栏
// 基础依赖包,必须要依赖
implementation 'com.geyifeng.immersionbar:immersionbar:3.2.2'
// kotlin扩展(可选)
implementation 'com.geyifeng.immersionbar:immersionbar-ktx:3.2.2'
// Kotlin coil 图片加载框架
implementation "io.coil-kt:coil:2.1.0"
implementation "io.coil-kt:coil-gif:2.1.0"
implementation "io.coil-kt:coil-svg:2.1.0"
implementation "io.coil-kt:coil-video:2.1.0"
//smart刷新核心必须依赖
implementation 'io.github.scwang90:refresh-layout-kernel:2.0.5'
implementation 'io.github.scwang90:refresh-header-classics:2.0.5'
// 事件总线
implementation("org.greenrobot:eventbus:3.3.1")
// 自动生成SPI暴露服务文件
implementation "com.google.auto.service:auto-service:1.0-rc6"
implementation "com.google.auto.service:auto-service-annotations:1.0-rc6"
//规避 64K 限制
implementation "androidx.multidex:multidex:2.0.1"
//通用RecyclerViewAdapter
implementation "com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4"
//腾讯 阿里路由
implementation 'com.alibaba:arouter-api:1.5.2'
// okhttp
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0'
// 协程
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2'
// retrofit2
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
//腾讯 mmkv
implementation 'com.tencent:mmkv-static:1.2.13'
//文件下载引擎,稳定、高效、灵活、简单易用
api 'com.liulishuo.filedownloader:library:1.7.7'
// 今日头条屏幕适配方案
implementation 'com.github.JessYanCoding:AndroidAutoSize:v1.2.1'
// 权限请求框架:https://github.com/getActivity/XXPermissions
implementation 'com.github.getActivity:XXPermissions:11.6'
implementation 'com.github.bumptech.glide:glide:4.12.0'
//bugly
implementation 'com.tencent.bugly:crashreport:3.4.4'
implementation 'com.tencent.bugly:nativecrashreport:3.9.2'
// 底部导航栏
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
// 腾讯x5
implementation 'com.github.Justson.AgentWeb:agentweb-core:v5.0.6-androidx'
// 查看数据库 https://github.com/amitshekhariitbhu/Android-Debug-Database
// 查看数据库地址方法 项目中搜索 "数据库地址" 得到地址之后 在浏览器打开连接
// 记得用完注释掉,否则线上报错
stagdebugImplementation 'com.amitshekhar.android:debug-db:1.0.6'
offdebugImplementation 'com.amitshekhar.android:debug-db:1.0.6'
graydebugImplementation 'com.amitshekhar.android:debug-db:1.0.6'
}