Skip to content

Commit 7b1f1e2

Browse files
committed
feat: Add Kotlin serialization and update dependencies
This commit introduces the Kotlin serialization plugin and necessary dependencies for JSON serialization. It also updates several library versions. Changes: - Added the Kotlin serialization plugin: `org.jetbrains.kotlin.plugin.serialization` version `2.1.20` to both the project and the app level `build.gradle.kts` files. This is for JSON serialization. - Added the JSON serialization library dependency: `org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.0`. - Added dependencies for ViewModel, Koin, Compose Navigation, SplashScreen, extended Material Icons, Retrofit, and Material 3. - Updated `kotlin` version to `2.1.20` - Updated `composeBom` version to `2025.03.01`
1 parent 210e9d5 commit 7b1f1e2

3 files changed

Lines changed: 41 additions & 2 deletions

File tree

app/build.gradle.kts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ plugins {
22
alias(libs.plugins.android.application)
33
alias(libs.plugins.kotlin.android)
44
alias(libs.plugins.kotlin.compose)
5+
id("org.jetbrains.kotlin.plugin.serialization") version "2.1.20"
56
}
67

78
android {
@@ -41,6 +42,43 @@ android {
4142

4243
dependencies {
4344

45+
// ViewModel
46+
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7")
47+
// ViewModel utilities for Compose
48+
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.7")
49+
// Lifecycle utilities for Compose
50+
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.7")
51+
52+
// Koin
53+
implementation("io.insert-koin:koin-core:4.0.3")
54+
implementation("io.insert-koin:koin-android:4.0.3")
55+
implementation("io.insert-koin:koin-androidx-compose:4.0.3")
56+
implementation("io.insert-koin:koin-androidx-compose-navigation:4.0.3")
57+
58+
// Compose Navigation
59+
implementation("androidx.navigation:navigation-compose:2.8.9")
60+
61+
// JSON serialization library, works with the Kotlin serialization plugin
62+
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.0")
63+
64+
// SplashScreen
65+
implementation("androidx.core:core-splashscreen:1.2.0-beta01")
66+
67+
// Icon
68+
// Compose Material Icons Extended
69+
implementation("androidx.compose.material:material-icons-extended:1.7.8")
70+
71+
// Retrofit
72+
implementation("com.squareup.retrofit2:retrofit:2.11.0")
73+
implementation("com.squareup.retrofit2:converter-gson:2.11.0")
74+
implementation("com.squareup.okhttp3:okhttp:4.12.0")
75+
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
76+
77+
// Material 3
78+
implementation("androidx.compose.material3:material3:1.3.1")
79+
implementation("androidx.compose.material3:material3-android:1.3.1")
80+
implementation("androidx.compose.ui:ui:1.7.8")
81+
4482
implementation(libs.androidx.core.ktx)
4583
implementation(libs.androidx.lifecycle.runtime.ktx)
4684
implementation(libs.androidx.activity.compose)

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ plugins {
33
alias(libs.plugins.android.application) apply false
44
alias(libs.plugins.kotlin.android) apply false
55
alias(libs.plugins.kotlin.compose) apply false
6+
id("org.jetbrains.kotlin.plugin.serialization") version "2.1.20" apply false
67
}

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[versions]
22
agp = "8.9.1"
3-
kotlin = "2.0.21"
3+
kotlin = "2.1.20"
44
coreKtx = "1.15.0"
55
junit = "4.13.2"
66
junitVersion = "1.2.1"
77
espressoCore = "3.6.1"
88
lifecycleRuntimeKtx = "2.8.7"
99
activityCompose = "1.10.1"
10-
composeBom = "2024.09.00"
10+
composeBom = "2025.03.01"
1111

1212
[libraries]
1313
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }

0 commit comments

Comments
 (0)