-
Notifications
You must be signed in to change notification settings - Fork 12
/
versions.gradle
112 lines (95 loc) · 3.69 KB
/
versions.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
ext.deps = [:]
// 版本号
def versions = [:]
versions.androidx = '1.1.0'
versions.android = '3.6.1'
versions.kotlin = '1.3.61'
versions.constraintlayout = "1.1.3"
versions.junit = '4.13'
versions.runner = "1.2.0"
versions.espresso_core = "3.2.0"
versions.room = '2.2.3'
versions.retrofit = '2.7.1'
versions.okhttp = '4.3.1'
versions.rxjava2 = "2.4.0"
versions.rxandroid = "2.1.1"
versions.stetho = '1.5.1'
versions.lifecycle = '2.2.0'
versions.dagger = '2.26'
versions.material = '1.2.0-alpha04'
versions.glide = '4.11.0'
versions.paging = '2.1.1'
// 依赖
def deps = [:]
// androidx 依赖
def androidx = [:]
androidx.plugin = "com.android.tools.build:gradle:$versions.android"
androidx.appcompat = "androidx.appcompat:appcompat:$versions.androidx"
androidx.ktx = "androidx.core:core-ktx:$versions.androidx"
androidx.constraintlayout = "androidx.constraintlayout:constraintlayout:$versions.constraintlayout"
androidx.material = "com.google.android.material:material:$versions.material"
deps.androidx = androidx
def paging = [:]
paging.common = "androidx.paging:paging-common:$versions.paging"
paging.runtime = "androidx.paging:paging-runtime:$versions.paging"
paging.rxjava2 = "androidx.paging:paging-rxjava2:$versions.paging"
deps.paging = paging
// kotlin 依赖
def kotlin = [:]
kotlin.stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$versions.kotlin"
kotlin.plugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
deps.kotlin = kotlin
// 测试相关
def testing = [:]
testing.junit = "junit:junit:$versions.junit"
testing.runner = "androidx.test:runner:$versions.runner"
testing.espresso_core = "androidx.test.espresso:espresso-core:$versions.espresso_core"
deps.testing = testing
// room 数据库
def room = [:]
room.runtime = "androidx.room:room-runtime:$versions.room"
room.rxjava2 = "androidx.room:room-rxjava2:$versions.room"
room.compiler = "androidx.room:room-compiler:$versions.room"
deps.room = room
// 网络请求库
def okhttp = [:]
okhttp.runtime = "com.squareup.okhttp3:okhttp:$versions.okhttp"
okhttp.logging = "com.squareup.okhttp3:logging-interceptor:$versions.okhttp"
deps.okhttp = okhttp
def retrofit = [:]
retrofit.runtime = "com.squareup.retrofit2:retrofit:$versions.retrofit"
retrofit.gson = "com.squareup.retrofit2:converter-gson:$versions.retrofit"
retrofit.rxjava2 = "com.squareup.retrofit2:adapter-rxjava2:$versions.retrofit"
deps.retrofit = retrofit
// dagger2 依赖注入
def dagger = [:]
dagger.runtime = "com.google.dagger:dagger:$versions.dagger"
dagger.android = "com.google.dagger:dagger-android:$versions.dagger"
dagger.android_support = "com.google.dagger:dagger-android-support:$versions.dagger"
dagger.compiler = "com.google.dagger:dagger-compiler:$versions.dagger"
dagger.android_processor = "com.google.dagger:dagger-android-processor:$versions.dagger"
deps.dagger = dagger
// rxjava
def reactivex = [:]
reactivex.rxjava2 = "io.reactivex.rxjava2:rxkotlin:$versions.rxjava2"
reactivex.rxandroid = "io.reactivex.rxjava2:rxandroid:$versions.rxandroid"
deps.reactivex = reactivex
// debug
def stetho = [:]
stetho.runtime = "com.facebook.stetho:stetho:$versions.stetho"
stetho.okhttp = "com.facebook.stetho:stetho-okhttp3:$versions.stetho"
deps.stetho = stetho
def lifecycle = [:]
lifecycle.extensions = "androidx.lifecycle:lifecycle-extensions:$versions.lifecycle"
lifecycle.compiler = "androidx.lifecycle:lifecycle-compiler:$versions.lifecycle"
deps.lifecycle = lifecycle
// 图片加载库
def glide = [:]
glide.runtime = "com.github.bumptech.glide:glide:$versions.glide"
glide.compiler = "com.github.bumptech.glide:compiler:$versions.glide"
deps.glide = glide
ext.deps = deps
def build_versions = [:]
build_versions.min_sdk = 21
build_versions.target_sdk = 28
ext.build_versions = build_versions