diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 58a6a200..ce4d7561 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -15,6 +15,10 @@ android { versionName = "1.0" } + compileOptions { + isCoreLibraryDesugaringEnabled = true + } + flavorDimensions.add("network") productFlavors { @@ -76,6 +80,8 @@ android { } dependencies { + coreLibraryDesugaring(libs.desugaring) + implementation(libs.androidx.activity) implementation(libs.androidx.annotation) implementation(libs.androidx.core) diff --git a/gradle.properties b/gradle.properties index ef41e006..298cf149 100644 --- a/gradle.properties +++ b/gradle.properties @@ -65,6 +65,7 @@ ANDROIDX_TEST_VERSION=1.4.1-alpha03 ANDROIDX_TEST_JUNIT_VERSION=1.1.3 ANDROIDX_TEST_ORCHESTRATOR_VERSION=1.4.1-alpha03 ANDROIDX_UI_AUTOMATOR_VERSION=2.2.0-alpha1 +CORE_LIBRARY_DESUGARING_VERSION=1.1.5 GOOGLE_MATERIAL_VERSION=1.4.0 JACOCO_VERSION=0.8.7 KOTLINX_COROUTINES_VERSION=1.5.2 diff --git a/settings.gradle.kts b/settings.gradle.kts index c0b8ea19..9bfcf61f 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -59,6 +59,7 @@ dependencyResolutionManagement { val androidxTestVersion = extra["ANDROIDX_TEST_VERSION"].toString() val androidxUiAutomatorVersion = extra["ANDROIDX_UI_AUTOMATOR_VERSION"].toString() val androidxSecurityCryptoVersion = extra["ANDROIDX_SECURITY_CRYPTO_VERSION"].toString() + val coreLibraryDesugaringVersion = extra["CORE_LIBRARY_DESUGARING_VERSION"].toString() val googleMaterialVersion = extra["GOOGLE_MATERIAL_VERSION"].toString() val jacocoVersion = extra["JACOCO_VERSION"].toString() val javaVersion = extra["ANDROID_JVM_TARGET"].toString() @@ -86,6 +87,7 @@ dependencyResolutionManagement { alias("androidx-lifecycle-livedata").to("androidx.lifecycle:lifecycle-livedata-ktx:$androidxLifecycleVersion") alias("androidx-security-crypto").to("androidx.security:security-crypto-ktx:$androidxSecurityCryptoVersion") alias("androidx-viewmodel-compose").to("androidx.lifecycle:lifecycle-viewmodel-compose:$androidxLifecycleVersion") + alias("desugaring").to("com.android.tools:desugar_jdk_libs:$coreLibraryDesugaringVersion") alias("google-material").to("com.google.android.material:material:$googleMaterialVersion") alias("kotlin").to("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion") alias("kotlinx-coroutines-android").to("org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinxCoroutinesVersion")