build: enable support for building with Java 17

This commit is contained in:
Harsh Shandilya 2021-12-05 19:54:25 +05:30
parent 8fbafa8d47
commit 66b391a2f2
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80
3 changed files with 31 additions and 15 deletions

View file

@ -8,8 +8,8 @@ plugins {
}
kotlin {
android { compilations.all { kotlinOptions.jvmTarget = "11" } }
jvm("desktop") { compilations.all { kotlinOptions.jvmTarget = "11" } }
android()
jvm("desktop")
sourceSets["commonMain"].apply {
dependencies {
api(compose.runtime)
@ -31,11 +31,6 @@ kotlin {
sourceSets["desktopMain"].apply { dependencies { implementation(libs.kamel.image) } }
}
tasks.withType<KotlinCompile> {
kotlinOptions.freeCompilerArgs =
kotlinOptions.freeCompilerArgs + listOf("-Xopt-in=kotlin.RequiresOptIn")
}
android {
buildFeatures { androidResources = true }
compileSdk = 31