@@ -92,16 +92,17 @@ android {
92
92
}
93
93
}
94
94
95
- flavorDimensions.addAll(listOf (" server" ))
95
+ val serverDimension = " server"
96
+ flavorDimensions.addAll(listOf (serverDimension))
96
97
productFlavors {
97
98
create(" dev" ) {
98
- dimension = " server "
99
+ dimension = serverDimension
99
100
applicationIdSuffix = " .dev"
100
101
resValue(" string" , " app_name" , " Movie DB Dev" )
101
102
buildConfigField(" boolean" , " MOCK_DATA" , " true" )
102
103
}
103
104
create(" prd" ) {
104
- dimension = " server "
105
+ dimension = serverDimension
105
106
resValue(" string" , " app_name" , " Movie DB" )
106
107
buildConfigField(" boolean" , " MOCK_DATA" , " false" )
107
108
}
@@ -120,13 +121,12 @@ android {
120
121
}
121
122
}
122
123
}
123
-
124
124
compileOptions {
125
- sourceCompatibility(JavaVersion .VERSION_11 )
126
- targetCompatibility(JavaVersion .VERSION_11 )
125
+ sourceCompatibility(JavaVersion .VERSION_17 )
126
+ targetCompatibility(JavaVersion .VERSION_17 )
127
127
}
128
128
kotlinOptions {
129
- jvmTarget = " 11 "
129
+ jvmTarget = JavaVersion . VERSION_17 .toString()
130
130
// freeCompilerArgs = listOf("-Xallow-result-return-type")
131
131
}
132
132
// https://developer.android.com/topic/libraries/data-binding
@@ -135,7 +135,7 @@ android {
135
135
compose = true
136
136
}
137
137
composeOptions {
138
- kotlinCompilerExtensionVersion = " 1.4.0 "
138
+ kotlinCompilerExtensionVersion = " 1.4.7 "
139
139
}
140
140
lint {
141
141
checkReleaseBuilds = false
@@ -149,33 +149,33 @@ dependencies {
149
149
implementation(" androidx.legacy:legacy-support-v4:1.0.0" )
150
150
implementation(" androidx.constraintlayout:constraintlayout:2.1.4" )
151
151
implementation(" androidx.recyclerview:recyclerview:1.3.0" )
152
- implementation(" com.google.android.material:material:1.8 .0" )
153
- implementation(" org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.10 " )
154
- implementation(" org.jetbrains.kotlin:kotlin-reflect:1.8.0 " )
152
+ implementation(" com.google.android.material:material:1.9 .0" )
153
+ implementation(" org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.21 " )
154
+ implementation(" org.jetbrains.kotlin:kotlin-reflect:1.8.21 " )
155
155
implementation(" androidx.multidex:multidex:2.0.1" )
156
156
157
157
// List of KTX extensions
158
158
// https://developer.android.com/kotlin/ktx/extensions-list
159
- implementation(" androidx.core:core-ktx:1.9 .0" )
160
- implementation(" androidx.activity:activity-ktx:1.6 .1" )
161
- implementation(" androidx.fragment:fragment-ktx:1.5.5 " )
159
+ implementation(" androidx.core:core-ktx:1.10 .0" )
160
+ implementation(" androidx.activity:activity-ktx:1.7 .1" )
161
+ implementation(" androidx.fragment:fragment-ktx:1.5.7 " )
162
162
163
163
// Lifecycle
164
164
// https://developer.android.com/jetpack/androidx/releases/lifecycle
165
- implementation(" androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.0 " )
166
- implementation(" androidx.lifecycle:lifecycle-livedata-ktx:2.6.0 " )
167
- implementation(" androidx.lifecycle:lifecycle-runtime-ktx:2.6.0 " )
168
- implementation(" androidx.lifecycle:lifecycle-common-java8:2.6.0 " )
165
+ implementation(" androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1 " )
166
+ implementation(" androidx.lifecycle:lifecycle-livedata-ktx:2.6.1 " )
167
+ implementation(" androidx.lifecycle:lifecycle-runtime-ktx:2.6.1 " )
168
+ implementation(" androidx.lifecycle:lifecycle-common-java8:2.6.1 " )
169
169
170
170
// Preferences DataStore
171
171
// https://android-developers.googleblog.com/2020/09/prefer-storing-data-with-jetpack.html
172
172
implementation(" androidx.datastore:datastore-preferences:1.0.0" )
173
173
174
174
// room
175
175
// https://developer.android.com/topic/libraries/architecture/room
176
- implementation(" androidx.room:room-runtime:2.5.0 " )
177
- kapt(" androidx.room:room-compiler:2.5.0 " )
178
- implementation(" androidx.room:room-ktx:2.5.0 " )
176
+ implementation(" androidx.room:room-runtime:2.5.1 " )
177
+ kapt(" androidx.room:room-compiler:2.5.1 " )
178
+ implementation(" androidx.room:room-ktx:2.5.1 " )
179
179
180
180
// paging
181
181
// https://developer.android.com/topic/libraries/architecture/paging
@@ -189,9 +189,9 @@ dependencies {
189
189
190
190
// coroutines
191
191
// https://github.com/Kotlin/kotlinx.coroutines
192
- implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4 " )
193
- implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 " )
194
- testImplementation(" org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4 " )
192
+ implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.0 " )
193
+ implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.0 " )
194
+ testImplementation(" org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.0 " )
195
195
196
196
// moshi
197
197
implementation(" com.squareup.moshi:moshi-kotlin:1.14.0" )
@@ -230,7 +230,7 @@ dependencies {
230
230
231
231
// firebase
232
232
// https://firebase.google.com/docs/android/setup
233
- implementation(platform(" com.google.firebase:firebase-bom:31.2.3 " ))
233
+ implementation(platform(" com.google.firebase:firebase-bom:32.0.0 " ))
234
234
implementation(" com.google.firebase:firebase-analytics-ktx" )
235
235
implementation(" com.google.firebase:firebase-crashlytics-ktx" )
236
236
implementation(" com.google.firebase:firebase-messaging-ktx" )
@@ -248,12 +248,12 @@ dependencies {
248
248
249
249
// unit test
250
250
testImplementation(" junit:junit:4.13.2" )
251
- testImplementation(" org.mockito:mockito-core:5.2.0 " )
251
+ testImplementation(" org.mockito:mockito-core:5.3.1 " )
252
252
// testImplementation("org.mockito:mockito-inline:3.3.3")
253
- testImplementation(" io.mockk:mockk:1.13.4 " )
253
+ testImplementation(" io.mockk:mockk:1.13.5 " )
254
254
testImplementation(" androidx.arch.core:core-testing:2.2.0" )
255
255
testImplementation(" com.squareup.okhttp3:mockwebserver:5.0.0-alpha.2" )
256
- testImplementation(" org.jetbrains.kotlin:kotlin-stdlib:1.8.10 " )
256
+ testImplementation(" org.jetbrains.kotlin:kotlin-stdlib:1.8.21 " )
257
257
// testImplementation("org.robolectric:robolectric:4.3")
258
258
259
259
/* *
@@ -373,45 +373,46 @@ dependencies {
373
373
// compose
374
374
// https://developer.android.com/jetpack/compose/interop/adding
375
375
// https://developer.android.com/jetpack/compose/setup
376
- implementation(" androidx.compose:compose-bom:2023.01.00" )
377
- androidTestImplementation(" androidx.compose:compose-bom:2023.01.00" )
378
- // Android Studio Preview support
379
- implementation(" androidx.compose.ui:ui-tooling-preview" )
380
- debugImplementation(" androidx.compose.ui:ui-tooling" )
381
- // Animations
382
- implementation(" androidx.compose.animation:animation" )
376
+ // implementation("androidx.compose.compiler:compiler:1.4.5")
377
+ // implementation("androidx.compose:compose-bom:2023.04.00")
378
+ // androidTestImplementation("androidx.compose:compose-bom:2023.04.00")
383
379
// Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.)
384
- implementation(" androidx.compose.foundation:foundation" )
380
+ implementation(" androidx.compose.foundation:foundation:1.4.3 " )
385
381
// or Material Design 2
386
- implementation(" androidx.compose.material:material" )
387
- // Material Design
388
- implementation(" androidx.compose.material3:material3" )
382
+ implementation(" androidx.compose.material:material:1.4.3" )
383
+ // Material Design 3
384
+ implementation(" androidx.compose.material3:material3:1.1.0-rc01" )
385
+ // Android Studio Preview support
386
+ implementation(" androidx.compose.ui:ui-tooling-preview:1.4.3" )
387
+ debugImplementation(" androidx.compose.ui:ui-tooling:1.4.3" )
388
+ // UI Tests
389
+ androidTestImplementation(" androidx.compose.ui:ui-test-junit4:1.5.0-alpha03" )
390
+ debugImplementation(" androidx.compose.ui:ui-test-manifest:1.4.3" )
391
+ // Animations
392
+ implementation(" androidx.compose.animation:animation:1.4.3" )
389
393
// Constraint layout
390
394
implementation(" androidx.constraintlayout:constraintlayout-compose:1.0.1" )
391
395
// Optional - Included automatically by material, only add when you need
392
396
// the icons but not the material library (e.g. when using Material3 or a
393
397
// custom design system based on Foundation)
394
398
// implementation("androidx.compose.material:material-icons-core")
395
399
// Optional - Add full set of material icons
396
- implementation(" androidx.compose.material:material-icons-extended" )
400
+ implementation(" androidx.compose.material:material-icons-extended:1.4.3 " )
397
401
// Optional - Add window size utils
398
- implementation(" androidx.compose.material3:material3-window-size-class" )
402
+ implementation(" androidx.compose.material3:material3-window-size-class:1.0.1 " )
399
403
// Optional - Integration with activities
400
- implementation(" androidx.activity:activity-compose:1.6 .1" )
404
+ implementation(" androidx.activity:activity-compose:1.7 .1" )
401
405
// Optional - Integration with ViewModels
402
- implementation(" androidx.lifecycle:lifecycle-viewmodel-compose:2.6.0 " )
406
+ implementation(" androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1 " )
403
407
// Optional - Integration with LiveData
404
- implementation(" androidx.compose.runtime:runtime-livedata" )
405
- // UI Tests
406
- androidTestImplementation(" androidx.compose.ui:ui-test-junit4" )
407
- debugImplementation(" androidx.compose.ui:ui-test-manifest" )
408
+ implementation(" androidx.compose.runtime:runtime-livedata:1.4.3" )
408
409
// navigation
409
410
implementation(" androidx.navigation:navigation-compose:2.5.3" )
410
411
implementation(" androidx.hilt:hilt-navigation-compose:1.0.0" )
411
412
// https://github.com/skydoves/landscapist
412
- implementation(" com.github.skydoves:landscapist -bom:2.1.7" )
413
- implementation(" com.github.skydoves:landscapist-glide" )
414
- implementation(" com.github.skydoves:landscapist-placeholder" )
413
+ // implementation("com.github.skydoves:landscape -bom:2.1.7")
414
+ implementation(" com.github.skydoves:landscapist-glide:2.1.13 " )
415
+ implementation(" com.github.skydoves:landscapist-placeholder:2.1.13 " )
415
416
// https://google.github.io/accompanist/
416
417
// https://github.com/google/accompanist
417
418
val accompanistVersion = " 0.28.0"
@@ -461,15 +462,27 @@ project.afterEvaluate {
461
462
sourceName = buildTypeName
462
463
} else {
463
464
sourcePath = " ${productFlavorName} /${buildTypeName} "
464
- sourceName = " ${productFlavorName}${buildTypeName.capitalize()} "
465
+ sourceName = " ${productFlavorName}${buildTypeName.replaceFirstChar {
466
+ if (it.isLowerCase()) it.titlecase(
467
+ Locale .getDefault()
468
+ ) else it.toString()
469
+ }} "
465
470
}
466
- val testTaskName = " test${sourceName.capitalize()} UnitTest"
471
+ val testTaskName = " test${sourceName.replaceFirstChar {
472
+ if (it.isLowerCase()) it.titlecase(
473
+ Locale .getDefault()
474
+ ) else it.toString()
475
+ }} UnitTest"
467
476
// Create coverage task of form 'testFlavorTypeCoverage' depending on 'testFlavorTypeUnitTest'
468
477
task<JacocoReport >(" ${testTaskName} Coverage" ) {
469
478
// where store all test to run follow second way above
470
479
group = " coverage"
471
480
description =
472
- " Generate Jacoco coverage reports on the ${sourceName.capitalize()} build."
481
+ " Generate Jacoco coverage reports on the ${sourceName.replaceFirstChar {
482
+ if (it.isLowerCase()) it.titlecase(
483
+ Locale .getDefault()
484
+ ) else it.toString()
485
+ }} build."
473
486
val excludeFiles = arrayListOf (
474
487
" **/R.class" , " **/R$*.class" , " **/BuildConfig.*" , " **/Manifest*.*" ,
475
488
" **/*Test*.*" , " android/**/*.*" ,
0 commit comments