-
Notifications
You must be signed in to change notification settings - Fork 122
/
build.gradle
151 lines (139 loc) · 5.78 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlinVersion = '1.3.41'
repositories {
google()
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jlleitschuh.gradle:ktlint-gradle:8.1.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
ext {
targetSdkVersion = 28
compileSdkVersion = 28
versions = [
kotlin : kotlinVersion,
androidx : [
core : '1.0.2',
annotation : '1.1.0',
fragment : '1.0.0',
material : '1.0.0',
media : '1.0.1',
palette : '1.0.0',
preference : '1.0.0',
recyclerView : '1.0.0',
cardView : '1.0.0',
constraintLayout : '1.1.3',
coordinatorLayout : '1.0.0',
drawerLayout : '1.0.0',
swipeRefreshLayout : '1.0.0'
],
dagger : '2.6',
rxJava : [
core : '1.1.6',
android : '1.2.1',
lifecycle : '0.6.1',
lifecycleExtras : '0.6.1',
permissions : '0.7.0@aar',
lint : '1.0'
],
retrofit : '2.0.2',
room : '2.0.0',
exoplayer : '2.6.1',
glide : '3.7.0',
gson : '2.7',
timber : '4.1.2',
views : [
heterogeneousadapter : '1.1',
recyclerviewFastscroll : '1.0.20',
verticalseekbar : '1.0.0'
]
]
deps = [
kotlin : [
stdlib : "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}"
],
androidx : [
core : "androidx.core:core:${versions.androidx.core}",
ktx : "androidx.core:core-ktx:${versions.androidx.core}",
annotation : "androidx.annotation:annotation:${versions.androidx.annotation}",
fragment : "androidx.fragment:fragment:${versions.androidx.fragment}",
material : "com.google.android.material:material:${versions.androidx.material}",
media : "androidx.media:media:${versions.androidx.media}",
palette : "androidx.palette:palette:${versions.androidx.palette}",
preference : "androidx.legacy:legacy-preference-v14:${versions.androidx.preference}",
recyclerView : "androidx.recyclerview:recyclerview:${versions.androidx.recyclerView}",
cardView : "androidx.cardview:cardview:${versions.androidx.cardView}",
constraintLayout : "androidx.constraintlayout:constraintlayout:${versions.androidx.constraintLayout}",
coordinatorLayout : "androidx.coordinatorlayout:coordinatorlayout:${versions.androidx.coordinatorLayout }",
drawerLayout : "androidx.drawerlayout:drawerlayout:${versions.androidx.drawerLayout}",
swipeRefreshLayout : "androidx.swiperefreshlayout:swiperefreshlayout:${versions.androidx.swipeRefreshLayout}"
],
dagger : [
runtime : "com.google.dagger:dagger:${versions.dagger}",
compiler : "com.google.dagger:dagger-compiler:${versions.dagger}"
],
rxJava : [
core : "io.reactivex:rxjava:${versions.rxJava.core}",
android : "io.reactivex:rxandroid:${versions.rxJava.android}",
lifecycle : "com.trello:rxlifecycle:${versions.rxJava.lifecycle}",
lifecycleExtras : "com.trello:rxlifecycle-components:${versions.rxJava.lifecycleExtras}",
permissions : "com.tbruyelle.rxpermissions:rxpermissions:${versions.rxJava.permissions}",
lint : "nl.littlerobots.rxlint:rxlint:${versions.rxJava.lint}"
],
retrofit : [
core : "com.squareup.retrofit2:retrofit:${versions.retrofit}",
gson : "com.squareup.retrofit2:converter-gson:${versions.retrofit}",
rxJava : "com.squareup.retrofit2:adapter-rxjava:${versions.retrofit}"
],
room : [
runtime : "androidx.room:room-runtime:${versions.room}",
compiler : "androidx.room:room-compiler:${versions.room}",
test : "androidx.room:room-testing:${versions.room}"
],
exoplayer : [
core : "com.google.android.exoplayer:exoplayer-core:${versions.exoplayer}"
],
glide : [
core : "com.github.bumptech.glide:glide:${versions.glide}"
],
gson : [
core : "com.google.code.gson:gson:${versions.gson}"
],
timber : [
core : "com.jakewharton.timber:timber:${versions.timber}"
],
views : [
heterogeneousadapter : "com.marverenic.heterogeneousadapter:heterogeneousadapter:${versions.views.heterogeneousadapter}",
recyclerviewFastscroll : "com.simplecityapps:recyclerview-fastscroll:${versions.views.recyclerviewFastscroll}",
verticalseekbar : "com.h6ah4i.android.widget.verticalseekbar:verticalseekbar:${versions.views.verticalseekbar}"
]
]
}
project.ext.preDexLibs = !project.hasProperty('disablePreDex')
subprojects {
apply plugin: "org.jlleitschuh.gradle.ktlint"
ktlint {
android = true
verbose = true
}
project.plugins.whenPluginAdded { plugin ->
if ("com.android.build.gradle.AppPlugin" == plugin.class.name) {
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
} else if ("com.android.build.gradle.LibraryPlugin" == plugin.class.name) {
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
}
}
}