diff --git a/benchmark/build.gradle.kts b/benchmark/build.gradle.kts index 4e334b6..7c9a9b5 100644 --- a/benchmark/build.gradle.kts +++ b/benchmark/build.gradle.kts @@ -1,3 +1,6 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + plugins { alias(libs.plugins.android.test) alias(libs.plugins.kotlin.android) @@ -51,4 +54,10 @@ androidComponents { beforeVariants(selector().all()) { it.enable = it.buildType == "benchmark" } +} + +tasks.withType { + compilerOptions { + jvmTarget = JvmTarget.fromTarget(properties["jvm.version"].toString()) + } } \ No newline at end of file diff --git a/sample/android/build.gradle.kts b/sample/android/build.gradle.kts index 7668007..e073b10 100644 --- a/sample/android/build.gradle.kts +++ b/sample/android/build.gradle.kts @@ -1,3 +1,6 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + plugins { alias(libs.plugins.android.app) alias(libs.plugins.kotlin.android) @@ -37,12 +40,6 @@ android { matchingFallbacks += listOf("release") isDebuggable = false } - // create("benchmark") { -// initWith(release) -// signingConfig = signingConfigs.getByName("debug") -// matchingFallbacks.add("release") -// proguardFiles("benchmark-rules.pro") -// } } compileOptions { sourceCompatibility = JavaVersion.toVersion(properties["jvm.version"].toString()) @@ -61,4 +58,10 @@ dependencies { implementation(libs.androidx.profile.installer) debugImplementation(libs.compose.runtime.tracing) detektPlugins(libs.compose.detekt.rules) +} + +tasks.withType { + compilerOptions { + jvmTarget = JvmTarget.fromTarget(properties["jvm.version"].toString()) + } } \ No newline at end of file diff --git a/sample/desktop/build.gradle.kts b/sample/desktop/build.gradle.kts index 919e347..3b69510 100644 --- a/sample/desktop/build.gradle.kts +++ b/sample/desktop/build.gradle.kts @@ -1,4 +1,6 @@ import org.jetbrains.compose.desktop.application.dsl.TargetFormat +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { alias(libs.plugins.kotlin.multiplatform) @@ -35,3 +37,14 @@ compose.desktop { dependencies { detektPlugins(libs.compose.detekt.rules) } + +java { + sourceCompatibility = JavaVersion.toVersion(properties["jvm.version"].toString()) + targetCompatibility = JavaVersion.toVersion(properties["jvm.version"].toString()) +} + +tasks.withType { + compilerOptions { + jvmTarget = JvmTarget.fromTarget(properties["jvm.version"].toString()) + } +} \ No newline at end of file