Skip to content

Commit

Permalink
Bump Kotlin, KSP and Compose (#647)
Browse files Browse the repository at this point in the history
* Bump Kotlin, KSP and Compose

* Fix Kotlin warnings
  • Loading branch information
msasikanth authored Jul 25, 2024
1 parent 33cc471 commit ab12043
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ iosApp/iosApp.xcodeproj/*
!iosApp/iosApp.xcodeproj/project.pbxproj
shared/shared.podspec
androidApp/release
.kotlin

# IntelliJ .idea folder
.idea/workspace.xml
Expand Down
1 change: 1 addition & 0 deletions androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ plugins {
alias(libs.plugins.compose)
alias(libs.plugins.ksp)
alias(libs.plugins.bugsnag)
alias(libs.plugins.kotlin.compose)
}

kotlin {
Expand Down
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ plugins {
alias(libs.plugins.spotless).apply(false)
alias(libs.plugins.kotlin.parcelize).apply(false)
alias(libs.plugins.kotlin.serialization).apply(false)
alias(libs.plugins.kotlin.compose).apply(false)
alias(libs.plugins.bugsnag).apply(false)
}

Expand Down Expand Up @@ -58,6 +59,6 @@ allprojects {
}

tasks.withType<KotlinCompile>().all {
kotlinOptions { freeCompilerArgs += "-Xexpect-actual-classes" }
compilerOptions { freeCompilerArgs.add("-Xexpect-actual-classes") }
}
}
9 changes: 5 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[versions]
kotlin = "1.9.23"
kotlin = "2.0.0"
android_gradle_plugin = "8.5.1"
compose = "1.6.2"
compose = "1.6.11"

android_sdk_compile = "34"
android_sdk_target = "34"
android_sdk_min = "26"

sqldelight = "2.0.2"
ktor = "2.3.12"
kotlinx_coroutines = "1.8.1"
kotlinx_coroutines = "1.9.0-RC"
kotlinx_date_time = "0.6.0"
kotlinx_immutable_collections = "0.3.7"
kotlinx_serialization_json = "1.6.3"
Expand All @@ -29,7 +29,7 @@ coil = "3.0.0-alpha04"
spotless = "6.25.0"
ktfmt = "0.44"
kotlininject = "0.7.1"
ksp = "1.9.23-1.0.20"
ksp = "2.0.0-1.0.23"
material_color_utilities = "1.0.0-alpha01"
ksoup = "0.1.2"
sqliteAndroid = "3.45.0"
Expand Down Expand Up @@ -125,6 +125,7 @@ android_library = { id = "com.android.library", version.ref = "android_gradle_pl
kotlin_multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlin_android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin_parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
kotlin_compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlin_serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
compose = { id = "org.jetbrains.compose", version.ref = "compose" }
sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" }
Expand Down
1 change: 1 addition & 0 deletions resources/icons/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.compose)
alias(libs.plugins.ksp)
alias(libs.plugins.kotlin.compose)
}

kotlin {
Expand Down
5 changes: 4 additions & 1 deletion resources/strings/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask

/*
* Copyright 2023 Sasikanth Miriyampalli
*
Expand All @@ -17,6 +19,7 @@ plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.compose)
alias(libs.plugins.ksp)
alias(libs.plugins.kotlin.compose)
}

kotlin {
Expand All @@ -38,7 +41,7 @@ ksp { arg("lyricist.packageName", "dev.sasikanth.rss.reader.resources.strings")

dependencies { add("kspCommonMainMetadata", libs.lyricist.processor) }

tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>>().all {
tasks.withType<KotlinCompilationTask<*>>().all {
if (name != "kspCommonMainKotlinMetadata") {
dependsOn("kspCommonMainKotlinMetadata")
}
Expand Down
3 changes: 3 additions & 0 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ plugins {
alias(libs.plugins.ksp)
alias(libs.plugins.kotlin.parcelize)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.compose)
}

composeCompiler { enableStrongSkippingMode = true }

@OptIn(ExperimentalKotlinGradlePluginApi::class)
kotlin {
jvmToolchain(20)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import kotlin.time.Duration.Companion.minutes
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.map
import kotlinx.datetime.Clock
import kotlinx.datetime.toInstant
import kotlinx.datetime.Instant
import me.tatarka.inject.annotations.Inject

@Inject
Expand Down Expand Up @@ -54,5 +54,5 @@ class LastUpdatedAt(private val dataStore: DataStore<Preferences>) {
dataStore.data
.map { preferences -> preferences[lastUpdatedAtKey] ?: return@map null }
.first()
?.toInstant()
?.let { Instant.parse(it) }
}

0 comments on commit ab12043

Please sign in to comment.