-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv.gradle
410 lines (292 loc) · 18.9 KB
/
env.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
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
ext{
// kotlin的版本
KOTLIN_VERSION = "1.6.10"
// jetpack compose的版本
COMPOSE_VERSION = "1.2.1"
//声明compose版本
kotlin_compiler_extension_version = "1.3.1"
buildVersions = [
app_min_sdk_version : 26,
app_compile_sdk_version : 33, //SDK编译版本
app_target_sdk_version : 31, //Android向前兼容的版本
app_build_tools_version : "30.0.0"
]
lib_kotlin = [
kotlin_stdlib : "org.jetbrains.kotlin:kotlin-stdlib:$KOTLIN_VERSION",
//krot https://juejin.cn/post/7136829279903416333#heading-1
kotlin_ktor_client_core:"io.ktor:ktor-client-core:2.1.0",
kotlin_ktor_client_android:"io.ktor:ktor-client-android:2.1.0",
kotlin_ktor_client_okhttp:"io.ktor:ktor-client-okhttp:2.1.0",
kotlin_ktor_client_logging:"io.ktor:ktor-client-logging:2.1.0",
kotlin_ktor_client_content_negotiation:"io.ktor:ktor-client-content-negotiation:2.1.0",
kotlin_ktor_serialization_kotlinx_json:"io.ktor:ktor-serialization-kotlinx-json:2.1.0",
//序列化
kotlin_serialization:"org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2",
//协程 https://juejin.cn/post/6908271959381901325#heading-9
kotlin_kotlinx_coroutines_core:"org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2",
kotlin_kotlinx_coroutines_android:"org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.2",
]
lib_google = [
google_exoplayer:"com.google.android.exoplayer:exoplayer:2.17.1",
google_material : "com.google.android.material:material:1.4.0",
google_gson:"com.google.code.gson:gson:2.8.8",
]
// AndroidX系列官方库
lib_androidx = [
androidx_core_ktx : "androidx.core:core-ktx:1.7.0",
androidx_annotation : "androidx.annotation:annotation:1.2.0",
androidx_appcompat : "androidx.appcompat:appcompat:1.3.1",
androidx_fragment : "androidx.fragment:fragment:1.3.6",
androidx_recyclerview : "androidx.recyclerview:recyclerview:1.2.1",
androidx_constraintlayout : "androidx.constraintlayout:constraintlayout:2.0.4",
androidx_viewpager : "androidx.viewpager:viewpager:1.0.0",
androidx_viewpager2 : "androidx.viewpager2:viewpager2:1.0.0",
//启动初始化
androidx_startup : "androidx.startup:startup-runtime:1.1.1",
//列表项分页,配合recyclerview使用
androidx_paging : "androidx.paging:paging-runtime:3.0.0",
//多dex,方法数超65535时使用
androidx_multidex : "androidx.multidex:multidex:2.0.1",
//卡片布局
androidx_cardview : "androidx.cardview:cardview:1.0.0",
//界面路由跳转 navigation
androidx_navigation_fragment_ktx : "androidx.navigation:navigation-fragment-ktx:2.3.5",
androidx_navigation_ui : "androidx.navigation:navigation-ui:2.3.5",
androidx_navigation_ui_ktx : "androidx.navigation:navigation-ui-ktx:2.3.5",
androidx_navigation_fragment : "androidx.navgation:navigation-fragment:2.3.5",
androidx_navigation_fragment_featue : "androidx.navigation:navigation-dynamic-features-fragment:2.3.5", // Feature module Support
androidx_navigation_compose:"androidx.navigation:navigation-compose:2.3.5", // Jetpack Compose Integration
//插件库,自动生成传输传递的代码,避免bundle传参数出现错误,使用此库中的插件:androidx.navigation.safeargs或androidx.navigation.safeargs.kotlin
androidx_navigation_gradle_plugin : "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.5",
//数据库
androidx_room_runtime : "androidx.room:room-runtime:2.3.0",
androidx_room_compiler : "androidx.room:room-compiler:2.3.0",
androidx_room_rxjava2 : "androidx.room:room-rxjava2:2.3.0",
androidx_room_rxjava3 : "androidx.room:room-rxjava3:2.3.0",
androidx_room_guava : "androidx.room:room-guava:2.3.0",
androidx_room_ktx:"androidx.room:room-ktx:2.3.0",
androidx_room_test : "androidx.room:room-testing:2.3.0",
//安全、加密
androidx_security : "androidx.security:security-crypto:1.0.0",
//界面切块
androidx_slice : "androidx.slice:slice-builders:1.1.0-alpha02",
//打印
androidx_print : "androidx.print:print:1.1.0-beta01",
androidx_lifecycle_extensions:"androidx.lifecycle:lifecycle-extensions:2.2.0",
//只包含lifecycle
androidx_lifecycle : "androidx.lifecycle:lifecycle-runtime:2.3.1",
androidx_lifecycle_ktx : "androidx.lifecycle:lifecycle-runtime-ktx:2.3.1", //lifecycleScope
/**
lifecycleScope.launch {
}
//另外,lifecycleScope还贴心地提供了launchWhenCreated、launchWhenStarted、launchWhenResumed方法,这些方法的闭包里面有协程的作用域,它们分别是在CREATED、STARTED、RESUMED时被执行。
lifecycleScope.launchWhenStarted {
repeat(100000) {
delay(100)
tvText.text = "$it"
}
}
*/
androidx_lifecycle_viewmodel : "androidx.lifecycle:lifecycle-viewmodel:2.3.1",
androidx_lifecycle_viewmodel_ktx : "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1", //viewModelStore
/**
val viewModelJob = SupervisorJob()
val uiScope = CoroutineScope(Dispatchers.Main + viewModelJob)
uiScope.launch {
}
viewModelJob.cancel()
//Google为我们创造了ViewModelScope,它通过向ViewModel类添加扩展属性来方便我们使用协程,而且在ViewModel被销毁时会自动取消其子协程。
class CommViewModel: ViewModel(), LifecycleObserver {
fun test(){
viewModelScope.launch {
}
}
}
*/
androidx_lifecycle_livedata : "androidx.lifecycle:lifecycle-livedata-ktx:2.3.1",
/**
//在我们平时使用LiveData的过程中,可能会涉及到这种场景:去请求网络拿结果,然后通过LiveData将数据转出去,在Activity里面收到通知,然后更新UI。非常常见的场景,这种情况下,我们可以通过官方的liveData构造器函数来简化上面的场景代码。
val netData: LiveData<String> = liveData {
//观察的时候在生命周期内,则会马上执行
val data = getNetData()
emit(data)
}
//将耗时任务切到IO线程去执行
private suspend fun getNetData() = withContext(Dispatchers.IO) {
//模拟网络耗时
delay(5000)
//模拟返回结果
"{}"
}
*/
androidx_lifecycle_livedata_ktx : "androidx.lifecycle:lifecycle-livedata:2.3.1",
//viewmodel持久化保存
androidx_lifecycle_savedstate : "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1",
//注解处理器
androidx_lifecycle_compiler : "androidx.lifecycle:lifecycle-compiler:2.3.1",
//使用java8时,不用注解处理器,使用这个库即可
androidx_lifecycle_common_java8 : "androidx.lifecycle:lifecycle-common-java8:2.3.1",
//在service中使用lifecycle
androidx_lifecycle_service : "androidx.lifecycle:lifecycle-service:2.3.1",
//进程的lifecycle
androidx_lifecycle_process : "androidx.lifecycle:lifecycle-process:2.3.1",
//livedata支持流式编程
androidx_lifecycle_reactivestreams_ktx: "androidx.lifecycle:lifecycle-reactivestreams-ktx:2.3.1",
androidx_lifecycle_reactivestreams : "androidx.lifecycle:lifecycle-reactivestreams:2.3.1",
//交互式的设置界面,自动保存设置参数
androidx_preference : "androidx.preference:preference:1.1.1",
androidx_preference_ktx : "androidx.preference:preference-ktx:1.1.1",
//进程终止时保存界面状态,重启时恢复界面
androidx_savedstate : "androidx.savedstate:savedstate:1.1.0",
androidx_savedstate_ktx : "androidx.savedstate:savedstate-ktx:1.1.0",
//界面动画
androidx_transition : "androidx.transition:transition:1.4.1",
androidx_transition_ktx : "androidx.transition:transition-ktx:1.4.1",
//安卓5.0以上的webkit,使用新的API
androidx_webkit : "androidx.webkit:webkit:1.4.0",
//后台运行的异步任务、延迟运行、定时运行(使用携程),2.1.0以上版本需要JDK1.8
androidx_work : "androidx.work:work-runtime:2.5.0",
androidx_work_ktx : "androidx.work:work-runtime-ktx:2.5.0",
androidx_work_rxjava2 : "androidx.work:work-rxjava2:2.5.0",
]
// Jetpack compose的官方库
lib_compose = [
compose_androidx_material : "androidx.compose.material:material:$COMPOSE_VERSION",
compose_material3 : "androidx.compose.material3:material3:1.0.0-beta02",
activity_compose : "androidx.activity:activity-compose:1.3.1",
animation : "androidx.compose.animation:animation:$COMPOSE_VERSION",
lifecycle_viewmodel : "androidx.lifecycle:lifecycle-viewmodel-compose:2.4.1",
ui : "androidx.compose.ui:ui:$COMPOSE_VERSION",
ui_tooling : "androidx.compose.ui:ui-tooling:$COMPOSE_VERSION",
ui_tooling_preview : "androidx.compose.ui:ui-tooling-preview:$COMPOSE_VERSION",
ui_test_manifest : "androidx.compose.ui:ui-test-manifest:1.2.1",
runtime_livedata : "androidx.compose.runtime:runtime-livedata:1.2.1",
material_icons_extended : "androidx.compose.material:material-icons-extended:1.2.1",
material_icons_core : "androidx.compose.material:material-icons-core:1.2.1",
foundation : "androidx.compose.foundation:foundation:1.2.1"
]
//一些测试的
lib_test = [
test_junit : "junit:junit:4.13.2",
test_androidx_junit_ext : "androidx.test.ext:junit:4.13.2",
test_androidx_espresso_core:"androidx.test.espresso:espresso-core:3.4.0",
test_androidx_ui_test_junit4 : "androidx.compose.ui:ui-test-junit4:$COMPOSE_VERSION",
]
//第三方的
lib_other = [
other_pdf_lib:"com.github.barteksc:android-pdfjs-viewer:2.8.2",
//https://github.com/azhon/AppUpdate
other_appupdate:"io.github.azhon:appupdate:4.2.4",
//网络
other_retrofit:"com.squareup.retrofit2:retrofit:2.9.0",
other_retrofit2_gson:"com.squareup.retrofit2:converter-gson:2.9.0",
other_retrofit2_scalars:"com.squareup.retrofit2:converter-scalars:2.9.0",
other_okhttp3_okhttp:"com.squareup.okhttp3:okhttp:5.0.0-alpha.2",
other_okhttp3_logging_interceptor:"com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.2",
//rxhttp
other_rxhttp:"com.github.liujingxing.rxhttp:rxhttp:2.8.6",
// ksp/kapt/annotationProcessor choose one
other_rxhttp_compiler:"com.github.liujingxing.rxhttp:rxhttp-compiler:2.8.6",
//路由
//Arouter
other_Alibaba_Arouter_Api:"com.alibaba:arouter-api:1.5.2",
other_Alibaba_Arouter_Compiler:"com.alibaba:arouter-compiler:1.5.2",
//TheRouter https://therouter.cn/
other_TheRouter_module:"therouter",
other_TheRouter_plugin:"cn.therouter:plugin:1.1.0",
other_TheRouter_apt:"cn.therouter:apt:1.1.0",
other_TheRouter_router:"cn.therouter:router:1.1.0",
//存储
other_Tencent_Mmkv:" com.tencent:mmkv:1.2.14",
//权限
other_getActivity_XXPermissions : "com.github.getActivity:XXPermissions:13.6",
//多语言
other_getActivity_MultiLanguages:"com.github.getActivity:MultiLanguages:8.0",
//utils
other_utils : "com.blankj:utilcodex:1.31.0",
//压缩
other_Luban:"top.zibin:Luban:1.1.8",
//数据
//json
fastjson:"com.alibaba:fastjson:1.2.76",
fastjson_android:"com.alibaba:fastjson:1.1.72.android",
mosh_kotlin:"com.squareup.moshi:moshi-kotlin:1.13.0",
//event 组件通讯
other_eventbus:"org.greenrobot:eventbus:3.2.0",
//组件
//webview
other_Tencent_Tbs:"com.tencent.tbs:tbssdk:44216",
//实现webview离线加载https://github.com/HuolalaTech/HLLOfflineWebView-android
//toast
other_getActivity_ToastUtils:"com.github.getActivity:ToastUtils:10.5",
//shape
other_getActivity_ShapeView:"com.github.getActivity:ShapeView:6.0",
//dialog
other_material_dialogs_core : "com.afollestad.material-dialogs:core:3.3.0",
other_material_dialogs_input : 'com.afollestad.material-dialogs:input:3.3.0',
other_material_dialogs_datetime: 'com.afollestad.material-dialogs:datetime:3.3.0',
other_material_dialogs_bottomsheets: 'com.afollestad.material-dialogs:bottomsheets:3.3.0',
//DialogX https://github.com/kongzue/DialogX
other_dialogx:"com.github.kongzue.DialogX:DialogX:0.0.46",
//BasePopup https://github.com/razerdp/BasePopup
other_basepopup : 'io.github.razerdp:BasePopup:3.2.0',
//xpopup https://github.com/li-xiaojun/XPopup
other_xpopup:"com.github.li-xiaojun:XPopup:2.9.2",
//recycle
other_baserecyclerviewadapterhelper:'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.7',
//选择器
AndroidPicker_Common:"implementation 'com.github.gzu-liyujiang.AndroidPicker:Common:4.1.9",
AndroidPicker_WheelView:"com.github.gzu-liyujiang.AndroidPicker:WheelView:4.1.9",
AndroidPicker_WheelPicker:"com.github.gzu-liyujiang.AndroidPicker:WheelPicker:4.1.9",
AndroidPicker_AddressPicker:"com.github.gzu-liyujiang.AndroidPicker:AddressPicker:4.1.9",
AndroidPicker_FilePicker:"com.github.gzu-liyujiang.AndroidPicker:FilePicker:4.1.9",
AndroidPicker_ColorPicker:"com.github.gzu-liyujiang.AndroidPicker:ColorPicker:4.1.9",
AndroidPicker_CalendarPicker:"com.github.gzu-liyujiang.AndroidPicker:CalendarPicker:4.1.9",
AndroidPicker_ImagePicker:"com.github.gzu-liyujiang.AndroidPicker:ImagePicker:4.1.9",
//banner
other_banner:"io.github.youth5201314:banner:2.2.2",
//图片
other_glide:"com.github.bumptech.glide:glide:4.12.0",
other_glide_compiler:"com.github.bumptech.glide:compiler:4.12.0",
other_sketch:"io.github.panpf.sketch3:sketch:3.1.0-beta02",
other_fresco:"com.facebook.fresco:fresco:2.6.0",
other_picasso:"com.squareup.picasso:picasso:2.71828",
//图片选择
pictureselector:"io.github.lucksiege:pictureselector:v3.10.6", //图片选择 PictureSelector 基础 (必须)
pictureselector_compress:"io.github.lucksiege:compress:v3.10.6", //图片压缩 (按需引入)
pictureselector_ucrop:"io.github.lucksiege:ucrop:v3.10.6", //图片裁剪 (按需引入)
pictureselector_camerax:"io.github.lucksiege:camerax:v3.10.6",//自定义相机
//栏
other_immersionbar:"com.geyifeng.immersionbar:immersionbar:3.2.2",
other_immersionbar_ktx: "com.geyifeng.immersionbar:immersionbar-ktx:3.2.2",
//视频播放
other_gsyvideoplayer:"com.github.CarGuo.GSYVideoPlayer:GSYVideoPlayer:v8.1.9-release-jitpack",
//刷新
other_refresh_layout_kernel: 'com.scwang.smart:refresh-layout-kernel:2.0.3',
other_refresh_layout_header: 'com.scwang.smart:refresh-header-material:2.0.3',
other_refresh_layout_footer: 'com.scwang.smart:refresh-footer-classics:2.0.1',
//Fragmentation 停维
// This is the use of androidx, if you are using the android.support: fragmentationx -> fragmentation
// implementation 'me.yokeyword:fragmentationx:1.0.2'
// If you don't want to extends SupportActivity/Fragment and would like to customize your own support, just rely on fragmentation-core
// implementation 'me.yokeyword:fragmentationx-core:1.0.2'
//To get SwipeBack feature, rely on both fragmentation & fragmentation-swipeback
// implementation 'me.yokeyword:fragmentationx:1.0.2'
// Swipeback is based on fragmentation. Refer to SwipeBackActivity/Fragment for your Customized SupportActivity/Fragment
// implementation 'me.yokeyword:fragmentationx-swipeback:1.0.2'
// To simplify the communication between Fragments.
// implementation 'me.yokeyword:eventbus-activity-scope:1.1.0'
// Your EventBus's version
// implementation 'org.greenrobot:eventbus:{version}'
// flutter_boost:https://github.com/alibaba/flutter_boost //原生混合集成flutter
// GaiaX:https://github.com/alibaba/GaiaX //动态卡片
// tinker: https://github.com/Tencent/tinker
// ARouter:https://github.com/alibaba/ARouter
//AndroidProject
//https://github.com/getActivity/AndroidProject
//RxTool
//https://github.com/Tamsiree/RxTool
//XUI
//https://github.com/xuexiangjys/XUI
]
}