-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathbuild.gradle
124 lines (105 loc) · 5.14 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlinVersion = '1.3.72'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.4.0"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
ext {
// Android
androidLifecycleVersion = '2.2.0'
androidAppCompatVersion = '1.3.1'
androidMaterialVersion = '1.2.1'
constraintLayoutVersion = '2.0.2'
// Rx
rxJavaVersion = '2.2.10'
rxKotlinVersion = '2.2.0'
rxAndroidVersion = '2.1.1'
// DI
daggerVersion = '2.29.1'
// Utils
debugDrawerVersion = '0.9.0'
timberVersion = '4.7.1'
scalpelVersion = '1.1.2'
glideVersion = '4.11.0'
// Network
okhttpVersion = '3.10.0'
retrofitVersion = '2.4.0'
gsonVersion = '2.8.5'
// Testing
junitVersion = '4.12'
supportTestVersion = '1.3.0'
mockitoKotlinVersion = '4.0.0'
depsWithVersion = [
// Kotlin
"org.jetbrains.kotlin:kotlin-stdlib-jdk7" : kotlinVersion,
// Android
"androidx.lifecycle:lifecycle-common-java8" : androidLifecycleVersion,
"androidx.appcompat:appcompat" : androidAppCompatVersion,
"androidx.constraintlayout:constraintlayout" : constraintLayoutVersion,
"com.google.android.material:material" : androidMaterialVersion,
// Rx
"io.reactivex.rxjava2:rxjava" : rxJavaVersion,
"io.reactivex.rxjava2:rxkotlin" : rxKotlinVersion,
"io.reactivex.rxjava2:rxandroid" : rxAndroidVersion,
// DI
"com.google.dagger:dagger" : daggerVersion,
"com.google.dagger:dagger-android" : daggerVersion,
"com.google.dagger:dagger-android-support" : daggerVersion,
"com.google.dagger:dagger-compiler" : daggerVersion,
"com.google.dagger:dagger-android-processor" : daggerVersion,
// DebugDrawer
"com.github.lenguyenthanh.debugdrawer:debugdrawer" : debugDrawerVersion,
"com.github.lenguyenthanh.debugdrawer:debugdrawer-base" : debugDrawerVersion,
"com.github.lenguyenthanh.debugdrawer:debugdrawer-view" : debugDrawerVersion,
"com.github.lenguyenthanh.debugdrawer:debugdrawer-no-op" : debugDrawerVersion,
"com.github.lenguyenthanh.debugdrawer:debugdrawer-view-no-op" : debugDrawerVersion,
"com.github.lenguyenthanh.debugdrawer:debugdrawer-commons" : debugDrawerVersion,
"com.github.lenguyenthanh.debugdrawer:debugdrawer-actions" : debugDrawerVersion,
"com.github.lenguyenthanh.debugdrawer:debugdrawer-scalpel" : debugDrawerVersion,
"com.github.lenguyenthanh.debugdrawer:debugdrawer-timber" : debugDrawerVersion,
"com.github.lenguyenthanh.debugdrawer:debugdrawer-network-quality": debugDrawerVersion,
// Utils
"com.jakewharton.timber:timber" : timberVersion,
"com.jakewharton.scalpel:scalpel" : scalpelVersion,
"com.github.bumptech.glide:glide" : glideVersion,
"com.github.bumptech.glide:compiler" : glideVersion,
// Network
"com.squareup.okhttp3:okhttp" : okhttpVersion,
"com.squareup.retrofit2:retrofit" : retrofitVersion,
"com.squareup.retrofit2:adapter-rxjava2" : retrofitVersion,
"com.squareup.retrofit2:converter-simplexml" : retrofitVersion,
"com.google.code.gson:gson" : gsonVersion,
// Testing
"junit:junit" : junitVersion,
"org.jetbrains.kotlin:kotlin-test-junit" : kotlinVersion,
"org.mockito.kotlin:mockito-kotlin" : mockitoKotlinVersion,
"androidx.test:runner" : supportTestVersion,
"androidx.test:orchestrator" : supportTestVersion,
"androidx.test:rules" : supportTestVersion,
]
deps = { String key ->
def version = depsWithVersion[key]
if (version == null) throw new IllegalDependencyNotation("Version for library '$key' unknown. Update root build.gradle")
"$key:${version}"
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}