Skip to content

Commit 6fee057

Browse files
authored
Merge pull request #574 from ooni/fix-android-7
Fix Android 7 java.time crash
2 parents 3e77709 + 79fab24 commit 6fee057

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

composeApp/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ android {
211211
compileOptions {
212212
sourceCompatibility = JavaVersion.VERSION_17
213213
targetCompatibility = JavaVersion.VERSION_17
214+
isCoreLibraryDesugaringEnabled = true
214215
}
215216
sourceSets["main"].resources.setSrcDirs(
216217
listOf(
@@ -265,6 +266,7 @@ android {
265266
}
266267
}
267268
dependencies {
269+
coreLibraryDesugaring(libs.android.desugar.jdk)
268270
debugImplementation(compose.uiTooling)
269271
"fullImplementation"(libs.bundles.full.android)
270272
androidTestUtil(libs.android.orchestrator)

gradle/libs.versions.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" }
3131
kotlin-serialization = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version = "1.8.0" }
3232
kotlin-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version = "0.6.2" }
3333

34+
# Java
35+
android-desugar-jdk = { module = "com.android.tools:desugar_jdk_libs", version = "2.1.5" }
36+
3437
# UI
3538
android-activity = { module = "androidx.activity:activity-ktx", version = "1.10.1" }
3639
android-fragment = { module = "androidx.fragment:fragment-ktx", version = "1.8.6" }

0 commit comments

Comments
 (0)