From b14870fbc5e8ba29dfeb564c173325c0de441360 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Fri, 5 Aug 2022 16:10:56 +0300 Subject: [PATCH] Reinstated desugaring since it broke the build --- android/build.gradle.kts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/android/build.gradle.kts b/android/build.gradle.kts index 5e738c466d..f3318aa7f3 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -27,7 +27,7 @@ android { defaultConfig { applicationId = "com.unciv.app" minSdk = 21 - targetSdk = 31 // See #5044 + targetSdk = 30 // See #5044 versionCode = BuildConfig.appCodeNumber versionName = BuildConfig.appVersion @@ -65,6 +65,8 @@ android { compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 + + isCoreLibraryDesugaringEnabled = true } androidResources { // Don't add local save files and fonts to release, obviously @@ -129,4 +131,6 @@ dependencies { // Known Android Lint warning: "GradleDependency" implementation("androidx.core:core-ktx:1.6.0") implementation("androidx.work:work-runtime-ktx:2.6.0") + // Needed to convert e.g. Android 26 API calls to Android 21 + coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5") }