diff --git a/app/build.gradle b/app/build.gradle index d581b1574..d6940de7f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,6 +4,7 @@ plugins { id 'com.android.application' id 'kotlin-android' id 'kotlin-kapt' + id 'kotlinx-serialization' } android { @@ -111,6 +112,9 @@ dependencies { implementation libs.square.retrofit implementation libs.square.retrofit.converterJackson implementation libs.jacksonAnnotations + implementation libs.kotlinx.serialization + implementation libs.kotlinx.datetime + implementation libs.kotlinx.serialization.retrofit /* Cronet and Coil */ coreLibraryDesugaring libs.desugaring diff --git a/build.gradle b/build.gradle index e3650b340..81dd9b027 100644 --- a/build.gradle +++ b/build.gradle @@ -5,13 +5,15 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { + ext.kotlin_version = '1.7.22' repositories { google() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:7.4.0' - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.22' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ce6611926..43006d4b3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -18,6 +18,9 @@ cronetOkHttp = "0.1.0" coil = "2.2.2" leakcanary = "2.10" room = "2.5.0" +kotlinxSerialization = "1.4.1" +kotlinxDatetime = "0.4.0" +kotlinxRetrofit = "0.8.0" [libraries] androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } @@ -46,4 +49,7 @@ lifecycle-viewmodel = { group = "androidx.lifecycle", name = "lifecycle-viewmode lifecycle-runtime = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycle" } lifecycle-livedata = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "lifecycle" } room = { group = "androidx.room", name="room-runtime", version.ref = "room" } -room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "room" } \ No newline at end of file +room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "room" } +kotlinx-serialization = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerialization" } +kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version.ref = "kotlinxDatetime" } +kotlinx-serialization-retrofit = { group = "com.jakewharton.retrofit", name = "retrofit2-kotlinx-serialization-converter", version.ref = "kotlinxRetrofit" } \ No newline at end of file