From 59e37e305f3d765d9f4a0827b269b467e504e1a2 Mon Sep 17 00:00:00 2001 From: Igor Demin Date: Mon, 11 Mar 2024 16:09:39 +0100 Subject: [PATCH] Imageviewer. Fix compilation of Android target (#4467) Fix regression after https://github.com/JetBrains/compose-multiplatform/pull/4433 `./gradlew compileReleaseKotlinAndroid` in `imageviewer` fails with: ``` * What went wrong: Execution failed for task ':shared:compileReleaseKotlinAndroid'. > Inconsistent JVM-target compatibility detected for tasks 'compileReleaseJavaWithJavac' (1.8) and 'compileReleaseKotlinAndroid' (17). ``` (JAVA_HOME points to JDK 17) --- examples/imageviewer/shared/build.gradle.kts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/imageviewer/shared/build.gradle.kts b/examples/imageviewer/shared/build.gradle.kts index d2ec4d1467..a34c2c23c7 100755 --- a/examples/imageviewer/shared/build.gradle.kts +++ b/examples/imageviewer/shared/build.gradle.kts @@ -72,6 +72,10 @@ android { defaultConfig { minSdk = 26 } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } kotlin { jvmToolchain(17) }