Add KotlinX Serialization dependencies.

This commit is contained in:
Isira Seneviratne 2023-01-18 06:28:21 +05:30
parent d5d36101c7
commit 65207ce72c
3 changed files with 14 additions and 2 deletions

View File

@ -4,6 +4,7 @@ plugins {
id 'com.android.application' id 'com.android.application'
id 'kotlin-android' id 'kotlin-android'
id 'kotlin-kapt' id 'kotlin-kapt'
id 'kotlinx-serialization'
} }
android { android {
@ -111,6 +112,9 @@ dependencies {
implementation libs.square.retrofit implementation libs.square.retrofit
implementation libs.square.retrofit.converterJackson implementation libs.square.retrofit.converterJackson
implementation libs.jacksonAnnotations implementation libs.jacksonAnnotations
implementation libs.kotlinx.serialization
implementation libs.kotlinx.datetime
implementation libs.kotlinx.serialization.retrofit
/* Cronet and Coil */ /* Cronet and Coil */
coreLibraryDesugaring libs.desugaring coreLibraryDesugaring libs.desugaring

View File

@ -5,13 +5,15 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
ext.kotlin_version = '1.7.22'
repositories { repositories {
google() google()
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.4.0' 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 // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files

View File

@ -18,6 +18,9 @@ cronetOkHttp = "0.1.0"
coil = "2.2.2" coil = "2.2.2"
leakcanary = "2.10" leakcanary = "2.10"
room = "2.5.0" room = "2.5.0"
kotlinxSerialization = "1.4.1"
kotlinxDatetime = "0.4.0"
kotlinxRetrofit = "0.8.0"
[libraries] [libraries]
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } 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-runtime = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycle" }
lifecycle-livedata = { group = "androidx.lifecycle", name = "lifecycle-livedata-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 = { group = "androidx.room", name="room-runtime", version.ref = "room" }
room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "room" } 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" }