mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-16 16:17:03 +05:30
build: enable support for building with Java 17
This commit is contained in:
parent
8fbafa8d47
commit
66b391a2f2
3 changed files with 31 additions and 15 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import org.gradle.api.tasks.compile.JavaCompile
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
|
@ -40,6 +41,10 @@ configure<com.diffplug.gradle.spotless.SpotlessExtension> {
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_11.toString()
|
||||||
|
targetCompatibility = JavaVersion.VERSION_11.toString()
|
||||||
|
}
|
||||||
tasks.withType<KotlinCompile>().configureEach {
|
tasks.withType<KotlinCompile>().configureEach {
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = JavaVersion.VERSION_11.toString()
|
jvmTarget = JavaVersion.VERSION_11.toString()
|
||||||
|
|
|
@ -8,8 +8,8 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
android { compilations.all { kotlinOptions.jvmTarget = "11" } }
|
android()
|
||||||
jvm("desktop") { compilations.all { kotlinOptions.jvmTarget = "11" } }
|
jvm("desktop")
|
||||||
sourceSets["commonMain"].apply {
|
sourceSets["commonMain"].apply {
|
||||||
dependencies {
|
dependencies {
|
||||||
api(compose.runtime)
|
api(compose.runtime)
|
||||||
|
@ -31,11 +31,6 @@ kotlin {
|
||||||
sourceSets["desktopMain"].apply { dependencies { implementation(libs.kamel.image) } }
|
sourceSets["desktopMain"].apply { dependencies { implementation(libs.kamel.image) } }
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<KotlinCompile> {
|
|
||||||
kotlinOptions.freeCompilerArgs =
|
|
||||||
kotlinOptions.freeCompilerArgs + listOf("-Xopt-in=kotlin.RequiresOptIn")
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
buildFeatures { androidResources = true }
|
buildFeatures { androidResources = true }
|
||||||
compileSdk = 31
|
compileSdk = 31
|
||||||
|
|
|
@ -4,12 +4,28 @@ kotlin.mpp.enableGranularSourceSetsMetadata=true
|
||||||
kotlin.native.enableDependencyPropagation=false
|
kotlin.native.enableDependencyPropagation=false
|
||||||
kotlin.mpp.stability.nowarn=true
|
kotlin.mpp.stability.nowarn=true
|
||||||
kotlin.mpp.hierarchicalStructureSupport=true
|
kotlin.mpp.hierarchicalStructureSupport=true
|
||||||
|
# Add opens for KAPT
|
||||||
|
# https://youtrack.jetbrains.com/issue/KT-45545#focus=Comments-27-4862682.0-0
|
||||||
org.gradle.jvmargs=-Dfile.encoding=UTF-8 \
|
org.gradle.jvmargs=-Dfile.encoding=UTF-8 \
|
||||||
--add-opens jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
|
--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
|
||||||
--add-opens jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
|
--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
|
||||||
--add-opens jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
|
--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
|
||||||
--add-opens jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
|
--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
|
||||||
--add-opens jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \
|
--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
|
||||||
--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
|
--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
|
||||||
--add-opens jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
|
--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
|
||||||
--add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
|
--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \
|
||||||
|
--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
|
||||||
|
--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
|
||||||
|
|
||||||
|
kotlin.daemon.jvmargs=-Dfile.encoding=UTF-8 \
|
||||||
|
--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
|
||||||
|
--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
|
||||||
|
--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
|
||||||
|
--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
|
||||||
|
--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
|
||||||
|
--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
|
||||||
|
--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
|
||||||
|
--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \
|
||||||
|
--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
|
||||||
|
--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue