-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.gradle
74 lines (51 loc) · 2.88 KB
/
config.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
//ext:自定义属性,所有关于版本的信息都利用ext放在另一个自己新建的gradle文件中集中管理
ext{
android = [
compileSdkVersion : 30,
applicationId : 'jack.mvvmanddatabinding',
minSdkVersion : 21,
targetSdkVersion : 30,
versionCode : 1,
versionName : "1.0"
]
version = [
androidSupportSdkVersion: "30.0.0",
junit_version : "4.13.1",
ext_junit_version : "1.1.2",
espresso_core_version : "3.2.0",
//support
appcompat_version : "1.2.0",
lifecycle_version : "2.2.0",
room_version : "2.2.5"
]
dependencies = [
"appcompat" : "androidx.appcompat:appcompat:${version["appcompat_version"]}",
//view
"constraint" : 'androidx.constraintlayout:constraintlayout:1.1.3',
//https://developer.android.google.cn/jetpack/androidx/releases/lifecycle?hl=zh_cn#version_230_2
//ViewModel
"viewModel" : "androidx.lifecycle:lifecycle-viewmodel:${version["lifecycle_version"]}",
// LiveData
"liveData" : "androidx.lifecycle:lifecycle-livedata:${version["lifecycle_version"]}",
// Lifecycles only (without ViewModel or LiveData)
"lifecycles" : "androidx.lifecycle:lifecycle-runtime:${version["lifecycle_version"]}",
// Saved state module for ViewModel
"stateViewModel" : "androidx.lifecycle:lifecycle-viewmodel-savedstate:${version["lifecycle_version"]}",
// alternately - if using Java8, use the following instead of lifecycle-compiler
"lifecycleCommon" : "androidx.lifecycle:lifecycle-common-java8:${version["lifecycle_version"]}",
//Annotation processor annotationProcessor
"lifecycle-compiler": "androidx.lifecycle:lifecycle-compiler:${version["lifecycle_version"]}",
//room
"room-runtime" : "androidx.room:room-runtime:${version["room_version"]}",
// optional - RxJava support for Room //Test Guava
"room-rxjava2" : "androidx.room:room-rxjava2:${version["room_version"]}",
"arouter-compiler" : "com.alibaba:arouter-compiler:1.2.2",
"arouter-api" : "com.alibaba:arouter-api:1.4.1",
//tools
//test
"androidJUnitRunner": "androidx.test.runner.AndroidJUnitRunner",
"junit" : "junit:junit:${version["junit_version"]}",
"ext:junit" : "androidx.test.ext:junit:${version["ext_junit_version"]}",
"espresso-core" : "androidx.test.espresso:espresso-core:${version["espresso_core_version"]}",
]
}