-
Notifications
You must be signed in to change notification settings - Fork 0
/
dependencies.gradle
147 lines (130 loc) · 7.84 KB
/
dependencies.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
ext {
ext.versionMajor = 0
ext.versionMinor = 0
ext.versionPatch = 1
ext.versionClassifier = "alpha"
androidMinSdkVersion = 21
androidTargetSdkVersion = 29
androidCompileSdkVersion = 29
androidBuildToolsVersion = '29.0.3'
appVersionCode = generateVersionCode()
appVersionName = generateVersionName()
//Plugins ###################################################################################################################
androidGradlePluginVersion = '4.0.0'
kotlinGradlePluginVersion = '1.3.72'
benManesPluginVersion = "0.24.0"
scabbardPluginVersion = "0.2.0"
navigationVersion = "2.3.0-rc01"
buildPlugins = [
androidGradlePlugin : "com.android.tools.build:gradle:$androidGradlePluginVersion",
kotlinGradlePlugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinGradlePluginVersion",
navigationSafeArgsPlugin : "androidx.navigation:navigation-safe-args-gradle-plugin:$navigationVersion",
//Plugin used for automated dependency version management https://github.com/ben-manes/gradle-versions-plugin
benManesVersionManagement: "com.github.ben-manes:gradle-versions-plugin:$benManesPluginVersion",
//Plugin used for visualizing Dagger graphs https://arunkumar9t2.github.io/scabbard/
scabbard : "gradle.plugin.dev.arunkumar:scabbard-gradle-plugin:$scabbardPluginVersion"
]
//Architecture Component Libraries ###################################################################################################################
pagingVersion = "2.1.2"
prefVersion = "1.1.0"
lifecyleExtensionVersion = '2.2.0'
room_version = "2.2.5"
archComponentLibraries = [
archPaging : "androidx.paging:paging-runtime-ktx:$pagingVersion",
preference : "androidx.preference:preference-ktx:$prefVersion",
//Set of extensions used that reduce some boilerplate codes when working with viewmodel, livedata lifecycle and etc.
lifecycleViewModel: "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecyleExtensionVersion",
lifecyclerLiveData: "androidx.lifecycle:lifecycle-livedata-ktx:$lifecyleExtensionVersion",
lifecycleRuntime : "androidx.lifecycle:lifecycle-runtime-ktx:$lifecyleExtensionVersion",
lifecycleExtention: "androidx.lifecycle:lifecycle-extensions:$lifecyleExtensionVersion",
navFragment : "androidx.navigation:navigation-fragment-ktx:$navigationVersion",
navUi : "androidx.navigation:navigation-ui-ktx:$navigationVersion",
room : "androidx.room:room-runtime:$room_version",
roomCompiler : "androidx.room:room-compiler:$room_version",
roomKtx : "androidx.room:room-ktx:$room_version"
]
//Essential Libraries ###################################################################################################################
materialVersion = "1.1.0"
appCompatVersion = "1.1.0"
legacySupportVersion = "1.0.0"
kotlinVersion = '1.3.61'
ktxVersion = '1.3.0'
constraintLayoutVersion = '2.0.0-beta7'
retrofitVersion = "2.8.0"
gsonVersion = "2.8.6"
gsonConverterVersion = "2.7.1"
loggingInterceptorVersion = "4.4.0"
daggerVersion = '2.28'
coroutineVersion = '1.3.3'
coroutineAdapterVersion = '0.9.2'
timberVersion = '4.7.1'
glideVersion = "4.10.0"
gmsVersion = '17.0.0'
desugarVersion = '1.0.9'
libraries = [
jdkDesugar : "com.android.tools:desugar_jdk_libs:$desugarVersion",
materialDesign : "com.google.android.material:material:$materialVersion",
appCompat : "androidx.appcompat:appcompat:$appCompatVersion",
recyclerView : "androidx.recyclerview:recyclerview:$appCompatVersion",
legacySupport : "androidx.legacy:legacy-support-v4:$legacySupportVersion",
kotlinStdLib : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion",
ktxCore : "androidx.core:core-ktx:$ktxVersion",
constraintLayout : "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion",
retrofit : "com.squareup.retrofit2:retrofit:$retrofitVersion",
gson : "com.google.code.gson:gson:$gsonVersion",
//Automated json conversion without the boilerplate needed when using only gson
gsonConverterFactory: "com.squareup.retrofit2:converter-gson:$gsonConverterVersion",
loggingInterceptor : "com.squareup.okhttp3:logging-interceptor:$loggingInterceptorVersion",
dagger : "com.google.dagger:dagger:$daggerVersion",
daggerCompiler : "com.google.dagger:dagger-compiler:$daggerVersion",
timber : "com.jakewharton.timber:timber:$timberVersion",
coroutineCore : "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion",
coroutineAndroid : "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutineVersion",
coroutineCallAdapter: "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:$coroutineAdapterVersion",
glide : "com.github.bumptech.glide:glide:$glideVersion",
glideAnnotation : "com.github.bumptech.glide:compiler:$glideVersion",
playServices : "com.google.android.gms:play-services-location:$gmsVersion"
]
//Test Libraries ###################################################################################################################
androidXTestCoreVersion = '1.2.0'
androidXTestExtKotlinRunnerVersion = '1.1.1'
archTestingVersion = '2.1.0'
fragmentTestVersion = '1.2.2'
hamcrestVersion = '1.3'
junitVersion = '4.13'
robolectricVersion = '4.3.1'
junit4Version = '4.12'
runnerVersion = '1.2.0'
espressoVersion = '3.2.0'
mockitoVersion = "2.2.0"
dexMakerVersion = '2.12.1'
testLibraries = [
junit4 : "junit:junit:$junit4Version",
hamcrest : "org.hamcrest:hamcrest-all:$hamcrestVersion",
mockito : "com.nhaarman.mockitokotlin2:mockito-kotlin:$mockitoVersion",
mockitoDexMaker : "com.linkedin.dexmaker:dexmaker-mockito:$dexMakerVersion",
archCoreTesting : "androidx.arch.core:core-testing:$archTestingVersion",
roboElectric : "org.robolectric:robolectric:$robolectricVersion",
coroutineTest : "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutineVersion",
fragmentTesting : "androidx.fragment:fragment-testing:$fragmentTestVersion",
androidXCoreTesting: "androidx.test:core:$androidXTestCoreVersion",
runner : "androidx.test:runner:$runnerVersion",
truth : "androidx.test.ext:truth:$runnerVersion",
rules : "androidx.test:rules:$runnerVersion",
androidXCoreKtx : "androidx.test:core-ktx:$androidXTestCoreVersion",
androidXextJunit : "androidx.test.ext:junit:$androidXTestExtKotlinRunnerVersion",
espresso_core : "androidx.test.espresso:espresso-core:$espressoVersion",
espresso_intent : "androidx.test.espresso:espresso-intents:$espressoVersion",
roomTesting : "androidx.room:room-testing:$room_version"
]
}
private Integer generateVersionCode() {
return (ext.versionMajor * 1000000) + (ext.versionMinor * 100000) + (ext.versionPatch * 10000) + Integer.valueOf(System.env.BUILD_NUMBER ?: 0)
}
private String generateVersionName() {
String versionName = "${ext.versionMajor}.${ext.versionMinor}.${ext.versionPatch}"
if (ext.versionClassifier != null) {
versionName += ext.versionClassifier
}
return versionName
}