1
+ import com.github.triplet.gradle.androidpublisher.ReleaseStatus
1
2
import java.io.FileInputStream
2
3
import java.util.Properties
3
4
import org.jetbrains.kotlin.config.KotlinCompilerVersion
4
- import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
5
5
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType
6
6
7
7
plugins {
8
8
id(" com.android.application" )
9
- id(" com.github.triplet.play" ) version " 2.7.2"
10
- id(" org.jlleitschuh.gradle.ktlint" ) version " 9.2.1"
9
+ id(" com.github.triplet.play" ) version " 3.0.0"
10
+ id(" com.sherepenko.gradle.plugin-build-version" ) version " 0.2.3"
11
+ id(" org.jlleitschuh.gradle.ktlint" ) version " 9.4.0"
11
12
kotlin(" android" )
12
13
kotlin(" android.extensions" )
13
14
kotlin(" kapt" )
14
15
}
15
16
16
17
val archivesBaseName = " launchiteasy"
17
- val buildVersion = BuildVersion (rootProject.file(" version" ))
18
18
19
19
val localPropertiesFile = rootProject.file(" local.properties" )
20
20
val keystorePropertiesFile = rootProject.file(" keystore.properties" )
21
21
val playstorePropertiesFile = rootProject.file(" playstore.properties" )
22
22
23
23
android {
24
- compileSdkVersion(29 )
24
+ compileSdkVersion(30 )
25
25
26
26
defaultConfig {
27
27
minSdkVersion(23 )
28
- targetSdkVersion(29 )
28
+ targetSdkVersion(30 )
29
29
applicationId = " com.sherepenko.android.launchiteasy"
30
30
versionCode = buildVersion.versionCode
31
31
versionName = buildVersion.versionName
@@ -36,7 +36,7 @@ android {
36
36
37
37
javaCompileOptions {
38
38
annotationProcessorOptions {
39
- arguments = mapOf (" room.schemaLocation" to " $projectDir /schemas" )
39
+ argument (" room.schemaLocation" , " $projectDir /schemas" )
40
40
}
41
41
}
42
42
@@ -61,11 +61,21 @@ android {
61
61
buildConfigField(" int" , " WEATHER_FORECASTS_LIMIT" , " 12" )
62
62
}
63
63
64
+ dependenciesInfo {
65
+ includeInApk = false
66
+ includeInBundle = false
67
+ }
68
+
64
69
compileOptions {
70
+ isCoreLibraryDesugaringEnabled = true
65
71
sourceCompatibility = JavaVersion .VERSION_1_8
66
72
targetCompatibility = JavaVersion .VERSION_1_8
67
73
}
68
74
75
+ kotlinOptions {
76
+ jvmTarget = JavaVersion .VERSION_1_8 .toString()
77
+ }
78
+
69
79
lintOptions {
70
80
ignore(" InvalidPackage" )
71
81
}
@@ -138,44 +148,44 @@ play {
138
148
load(FileInputStream (playstorePropertiesFile))
139
149
}
140
150
141
- serviceAccountCredentials = rootProject.file (
142
- playstoreProperties.getProperty(" playstore.credentials" )
151
+ serviceAccountCredentials.set (
152
+ rootProject.file( playstoreProperties.getProperty(" playstore.credentials" ) )
143
153
)
144
- defaultToAppBundles = true
145
- track = " alpha"
146
- releaseStatus = " inProgress "
154
+ defaultToAppBundles.set( true )
155
+ track.set( " alpha" )
156
+ releaseStatus.set( ReleaseStatus . IN_PROGRESS )
147
157
} else if (! System .getenv(" PLAYSTORE_CREDENTIALS" ).isNullOrEmpty()) {
148
- serviceAccountCredentials = rootProject.file (
149
- System .getenv(" PLAYSTORE_CREDENTIALS" )
158
+ serviceAccountCredentials.set (
159
+ rootProject.file( System .getenv(" PLAYSTORE_CREDENTIALS" ) )
150
160
)
151
- defaultToAppBundles = true
152
- track = " alpha"
153
- releaseStatus = " inProgress "
161
+ defaultToAppBundles.set( true )
162
+ track.set( " alpha" )
163
+ releaseStatus.set( ReleaseStatus . IN_PROGRESS )
154
164
} else {
155
- isEnabled = false
165
+ enabled.set( false )
156
166
}
157
167
}
158
168
159
- val glideVersion = " 4.11.0"
160
- val jacksonVersion = " 2.11.0"
161
- val koinVersion = " 2.1.5"
169
+ val jacksonVersion = " 2.11.3"
170
+ val koinVersion = " 2.2.0-rc-4"
162
171
val lifecycleVersion = " 2.2.0"
163
- val navigationVersion = " 2.3.0-alpha06 "
164
- val okHttpVersion = " 4.6 .0"
165
- val retrofitVersion = " 2.8.1 "
172
+ val navigationVersion = " 2.3.0"
173
+ val okHttpVersion = " 4.9 .0"
174
+ val retrofitVersion = " 2.9.0 "
166
175
val roomVersion = " 2.2.5"
167
- val workVersion = " 2.3.4"
176
+ val stethoVersion = " 1.5.1"
177
+ val workVersion = " 2.4.0"
168
178
169
179
dependencies {
180
+ coreLibraryDesugaring(" com.android.tools:desugar_jdk_libs:1.1.0" )
170
181
kapt(" androidx.lifecycle:lifecycle-compiler:$lifecycleVersion " )
171
182
kapt(" androidx.room:room-compiler:$roomVersion " )
172
- kapt(" com.github.bumptech.glide:compiler:$glideVersion " )
173
183
implementation(kotlin(" stdlib-jdk8" , KotlinCompilerVersion .VERSION ))
174
- implementation(" androidx.appcompat:appcompat:1.1 .0" )
184
+ implementation(" androidx.appcompat:appcompat:1.2 .0" )
175
185
implementation(" androidx.collection:collection-ktx:1.1.0" )
176
- implementation(" androidx.constraintlayout:constraintlayout:2.0.0-beta5 " )
177
- implementation(" androidx.core:core-ktx:1.2.0 " )
178
- implementation(" androidx.fragment:fragment-ktx:1.2.4 " )
186
+ implementation(" androidx.constraintlayout:constraintlayout:2.0.4 " )
187
+ implementation(" androidx.core:core-ktx:1.3.2 " )
188
+ implementation(" androidx.fragment:fragment-ktx:1.3.0-beta01 " )
179
189
implementation(" androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion " )
180
190
implementation(" androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion " )
181
191
implementation(" androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion " )
@@ -186,23 +196,24 @@ dependencies {
186
196
implementation(" androidx.preference:preference-ktx:1.1.1" )
187
197
implementation(" androidx.room:room-runtime:$roomVersion " )
188
198
implementation(" androidx.room:room-ktx:$roomVersion " )
189
- implementation(" androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-rc01 " )
199
+ implementation(" androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" )
190
200
implementation(" androidx.work:work-runtime-ktx:$workVersion " )
201
+ implementation(" com.facebook.stetho:stetho:$stethoVersion " )
202
+ implementation(" com.facebook.stetho:stetho-okhttp3:$stethoVersion " )
191
203
implementation(" com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion " )
192
204
implementation(" com.fasterxml.jackson.core:jackson-core:$jacksonVersion " )
193
205
implementation(" com.fasterxml.jackson.core:jackson-databind:$jacksonVersion " )
194
206
implementation(" com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion " )
195
- implementation(" com.github.bumptech.glide:glide: $glideVersion " )
207
+ implementation(" io.coil-kt:coil:1.0.0 " )
196
208
implementation(" io.github.inflationx:calligraphy3:3.1.1" )
197
209
implementation(" io.github.inflationx:viewpump:2.0.3" )
198
- implementation(" com.google.android.gms:play-services-location:17.0.0" )
199
- implementation(" com.google.android.material:material:1.2.0-alpha06" )
200
- implementation(" com.google.firebase:firebase-analytics:17.4.1" )
201
- implementation(" com.google.firebase:firebase-config-ktx:19.1.4" )
202
- implementation(" com.google.firebase:firebase-crashlytics:17.0.0" )
203
- implementation(" com.google.firebase:firebase-messaging:20.1.7" )
204
- implementation(" com.google.firebase:firebase-perf:19.0.7" )
205
- implementation(" com.jakewharton.threetenabp:threetenabp:1.2.2" )
210
+ implementation(" com.google.android.gms:play-services-location:17.1.0" )
211
+ implementation(" com.google.android.material:material:1.3.0-alpha03" )
212
+ implementation(" com.google.firebase:firebase-analytics-ktx:18.0.0" )
213
+ implementation(" com.google.firebase:firebase-config-ktx:20.0.0" )
214
+ implementation(" com.google.firebase:firebase-crashlytics-ktx:17.2.2" )
215
+ implementation(" com.google.firebase:firebase-messaging:21.0.0" )
216
+ implementation(" com.google.firebase:firebase-perf:19.0.9" )
206
217
implementation(" com.jakewharton.timber:timber:4.7.1" )
207
218
implementation(" com.squareup.okhttp3:okhttp:$okHttpVersion " )
208
219
implementation(" com.squareup.okhttp3:logging-interceptor:$okHttpVersion " )
@@ -213,39 +224,17 @@ dependencies {
213
224
implementation(" org.koin:koin-androidx-viewmodel:$koinVersion " )
214
225
debugImplementation(" com.squareup.leakcanary:leakcanary-android:2.3" )
215
226
testImplementation(" junit:junit:4.13" )
216
- testImplementation(" androidx.test:core:1.2 .0" )
217
- testImplementation(" androidx.test:runner:1.2 .0" )
218
- testImplementation(" androidx.test.ext:junit:1.1.1 " )
219
- testImplementation(" com.google.truth:truth:0.44 " )
220
- testImplementation(" com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0 " )
227
+ testImplementation(" androidx.test:core:1.3 .0" )
228
+ testImplementation(" androidx.test:runner:1.3 .0" )
229
+ testImplementation(" androidx.test.ext:junit:1.1.2 " )
230
+ testImplementation(" com.google.truth:truth:1.0.1 " )
231
+ testImplementation(" io.mockk:mockk:1.10.2 " )
221
232
testImplementation(" org.koin:koin-test:$koinVersion " )
222
- testImplementation(" org.robolectric:robolectric:4.3.1" )
223
- }
224
-
225
- tasks {
226
- withType<KotlinCompile > {
227
- kotlinOptions {
228
- jvmTarget = " 1.8"
229
- }
230
- }
231
-
232
- val incrementMajor by registering(IncrementVersion ::class ) {
233
- increment = Increment .MAJOR
234
- version = buildVersion
235
- }
236
-
237
- val incrementMinor by registering(IncrementVersion ::class ) {
238
- increment = Increment .MINOR
239
- version = buildVersion
240
- }
241
-
242
- val incrementPatch by registering(IncrementVersion ::class ) {
243
- increment = Increment .PATCH
244
- version = buildVersion
245
- }
233
+ testImplementation(" org.robolectric:robolectric:4.4" )
246
234
}
247
235
248
236
apply (plugin = " androidx.navigation.safeargs.kotlin" )
249
237
apply (plugin = " com.google.gms.google-services" )
250
238
apply (plugin = " com.google.firebase.crashlytics" )
251
239
apply (plugin = " com.google.firebase.firebase-perf" )
240
+ apply (plugin = " koin" )
0 commit comments