-
Notifications
You must be signed in to change notification settings - Fork 23
/
build.gradle
131 lines (107 loc) · 4.39 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'androidx.appcompat'
&& details.requested.name == 'appcompat') {
details.useVersion "1.2.0"
}
if (details.requested.group == 'androidx.activity'
&& details.requested.name == 'activity') {
details.useVersion "1.1.0"
}
if (details.requested.group == 'androidx.annotation'
&& details.requested.name == 'annotation') {
details.useVersion "1.1.0"
}
if (details.requested.group == 'androidx.arch.core'
&& details.requested.name == 'core-common') {
details.useVersion "2.1.0"
}
if (details.requested.group == 'androidx.arch.core'
&& details.requested.name == 'core-runtime') {
details.useVersion "2.1.0"
}
if (details.requested.group == 'androidx.collection'
&& details.requested.name == 'collection') {
details.useVersion "1.1.0"
}
if (details.requested.group == 'androidx.core'
&& details.requested.name == 'core') {
details.useVersion "1.10.1"
}
if (details.requested.group == 'androidx.coordinatorlayout'
&& details.requested.name == 'coordinatorlayout') {
details.useVersion "1.1.0"
}
if (details.requested.group == 'androidx.fragmen'
&& details.requested.name == 'fragment') {
details.useVersion "1.2.0"
}
if (details.requested.group == 'androidx.lifecycle'
&& details.requested.name == 'lifecycle-common') {
details.useVersion "2.2.0"
}
if (details.requested.group == 'androidx.lifecycle'
&& details.requested.name == 'lifecycle-livedata') {
details.useVersion "2.2.0"
}
if (details.requested.group == 'androidx.lifecycle'
&& details.requested.name == 'lifecycle-livedata-core') {
details.useVersion "2.2.0"
}
if (details.requested.group == 'androidx.lifecycle'
&& details.requested.name == 'lifecycle-runtime') {
details.useVersion "2.2.0"
}
if (details.requested.group == 'androidx.lifecycle'
&& details.requested.name == 'lifecycle-viewmodel') {
details.useVersion "2.2.0"
}
if (details.requested.group == 'androidx.lifecycle'
&& details.requested.name == 'lifecycle-viewmodel-savedstate') {
details.useVersion "2.2.0"
}
if (details.requested.group == 'androidx.vectordrawable'
&& details.requested.name == 'vectordrawable-animated') {
details.useVersion "1.1.0"
}
if (details.requested.group == 'com.squareup.okio'
&& details.requested.name == 'okio') {
details.useVersion "2.5.0"
}
if (details.requested.group == 'com.squareup.okhttp3'
&& details.requested.name == 'okhttp') {
details.useVersion "4.5.0"
}
if (details.requested.group == 'com.squareup.retrofit2'
&& details.requested.name == 'retrofit') {
details.useVersion "2.9.0"
}
if ((requested.group == "org.jetbrains.kotlin") && (requested.name.startsWith("kotlin-stdlib"))) {
useVersion("1.6.0")
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}