From 1e16204a3c720d32f3539e407316c9aa144fb16a Mon Sep 17 00:00:00 2001 From: Renee Vandervelde Date: Sat, 20 Jul 2024 09:26:34 -0500 Subject: [PATCH] Support Android 21 --- android/build.gradle.kts | 4 +++- android/src/main/AndroidManifest.xml | 1 + .../com/inkapplications/glassconsole/ApplicationModule.kt | 2 +- gradle/libs.versions.toml | 4 ++++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/android/build.gradle.kts b/android/build.gradle.kts index e118610..e24f94d 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -12,7 +12,7 @@ android { defaultConfig { applicationId = "com.inkapplications.glassconsole" - minSdk = 24 + minSdk = 21 targetSdk = 34 versionCode = project.properties.getOrDefault("versionCode", "1").toString().toInt() versionName = project.properties.getOrDefault("versionName", "SNAPSHOT").toString() @@ -51,6 +51,7 @@ android { compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 + isCoreLibraryDesugaringEnabled = true } kotlinOptions { jvmTarget = "1.8" @@ -68,6 +69,7 @@ android { } dependencies { + coreLibraryDesugaring(libs.android.desugaring) implementation(libs.bundles.androidx) implementation(platform(libs.compose.bom)) implementation(libs.bundles.compose) diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index e6533c8..29e334b 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -2,6 +2,7 @@ + diff --git a/android/src/main/java/com/inkapplications/glassconsole/ApplicationModule.kt b/android/src/main/java/com/inkapplications/glassconsole/ApplicationModule.kt index 3dc0b48..34ae14c 100644 --- a/android/src/main/java/com/inkapplications/glassconsole/ApplicationModule.kt +++ b/android/src/main/java/com/inkapplications/glassconsole/ApplicationModule.kt @@ -20,7 +20,7 @@ import regolith.processes.daemon.DaemonInitializer * Object graph used application-wide. */ class ApplicationModule( - val application: DisplayApplication, + application: DisplayApplication, ) { private val clock = Clock.System val displayServer = DisplayServer() diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e5eb641..3a2f7f7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -144,6 +144,10 @@ module = "com.inkapplications.ui:render-compose-android" version = "0.9.2" module = "com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings" +[libraries.android-desugaring] +version = "2.0.4" +module = "com.android.tools:desugar_jdk_libs" + [bundles] androidx = ["androidx-appcompat", "core-ktx", "lifecycle-runtime-ktx", "activity-compose"] compose = ["compose-ui", "compose-ui-graphics", "compose-foundation"]