@@ -2,11 +2,13 @@ plugins {
22 id ' com.android.application'
33 id ' kotlin-android'
44 id ' kotlin-kapt'
5+ id ' org.jetbrains.kotlin.plugin.serialization' version ' 1.4.20'
56}
67
78android {
89 compileSdkVersion 30
910 buildToolsVersion " 30.0.2"
11+ flavorDimensions " default"
1012
1113 defaultConfig {
1214 applicationId " com.monstarlab"
@@ -26,25 +28,53 @@ android {
2628 proguardFiles getDefaultProguardFile(' proguard-android-optimize.txt' ), ' proguard-rules.pro'
2729 }
2830 }
31+
32+ productFlavors {
33+ dev {
34+ dimension " default"
35+ applicationIdSuffix " .dev"
36+ manifestPlaceholders = [
37+ APP_NAME : " MonstarlabDev"
38+ ]
39+ buildConfigField " String" , " API_URL" , " \" https://jsonplaceholder.typicode.com\" "
40+ }
41+ staging {
42+ dimension " default"
43+ applicationIdSuffix " .staging"
44+ // signingConfig signingConfigs.staging
45+ manifestPlaceholders = [
46+ APP_NAME : " MonstarlabStaging"
47+ ]
48+ buildConfigField " String" , " API_URL" , " \" https://jsonplaceholder.typicode.com\" "
49+ }
50+ production {
51+ dimension " default"
52+ // signingConfig signingConfigs.production
53+ manifestPlaceholders = [
54+ APP_NAME : " Monstarlab" ,
55+ ]
56+ buildConfigField " String" , " API_URL" , " \" https://jsonplaceholder.typicode.com\" "
57+ }
58+ }
59+
2960 compileOptions {
3061 sourceCompatibility JavaVersion . VERSION_1_8
3162 targetCompatibility JavaVersion . VERSION_1_8
3263 }
3364 kotlinOptions {
3465 jvmTarget = ' 1.8'
35- freeCompilerArgs + = [
36- ' -Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi'
37- ]
3866 }
3967}
4068
4169dependencies {
4270
4371 implementation " org.jetbrains.kotlin:kotlin-stdlib:$versions . kotlin "
44- def coroutinesVersion = " 1.3.9 "
72+ def coroutinesVersion = " 1.4.2 "
4573
4674 implementation " org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion "
4775 implementation " org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$coroutinesVersion "
76+ implementation " org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.1"
77+
4878 implementation ' androidx.core:core-ktx:1.3.2'
4979 implementation ' androidx.appcompat:appcompat:1.2.0'
5080 implementation ' com.google.android.material:material:1.2.1'
@@ -58,8 +88,12 @@ dependencies {
5888 kapt " com.google.dagger:dagger-compiler:${ versions.dagger} "
5989 kapt " com.google.dagger:dagger-android-processor:${ versions.dagger} "
6090
61- implementation(" androidx.navigation:navigation-fragment-ktx:2.3.1" )
62- implementation(" androidx.navigation:navigation-ui-ktx:2.3.1" )
91+ implementation(" com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:0.8.0" )
92+ implementation(" com.squareup.retrofit2:retrofit:2.9.0" )
93+ implementation(" com.squareup.okhttp3:logging-interceptor:4.9.0" )
94+
95+ implementation(" androidx.navigation:navigation-fragment-ktx:2.3.2" )
96+ implementation(" androidx.navigation:navigation-ui-ktx:2.3.2" )
6397
6498 def lifecycle = " 2.2.0"
6599 implementation(" androidx.lifecycle:lifecycle-livedata-core-ktx:$lifecycle " )
0 commit comments