From 76ad71e1dc968cbd3f5dbf8d4435a8681cf0f8a3 Mon Sep 17 00:00:00 2001 From: davidoskky Date: Wed, 12 Apr 2023 15:33:07 +0200 Subject: [PATCH] Enable Core Library Desugaring to support older Android versions --- androidApp/build.gradle.kts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index 2435ea6..63dae0c 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -56,6 +56,7 @@ fun versionNameFromGit(): String { android { compileOptions { + isCoreLibraryDesugaringEnabled = true // Flag to enable support for the new language APIs sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 @@ -112,6 +113,8 @@ android { } dependencies { + coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.3") + implementation(project(":shared")) implementation("com.google.android.material:material:1.5.0") implementation("androidx.appcompat:appcompat:1.4.1") @@ -173,7 +176,7 @@ dependencies { implementation("androidx.lifecycle:lifecycle-extensions:2.2.0") // Network information - implementation("com.github.ln-12:multiplatform-connectivity-status:1.3.0") + implementation("com.github.ln-12:multiplatform-connectivity-status:1.3.0") // SQLDELIGHT implementation("com.squareup.sqldelight:android-driver:1.5.4") -- 2.34.1