mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 08:17:04 +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
|
||||
|
||||
buildscript {
|
||||
|
@ -40,6 +41,10 @@ configure<com.diffplug.gradle.spotless.SpotlessExtension> {
|
|||
}
|
||||
|
||||
allprojects {
|
||||
tasks.withType<JavaCompile>().configureEach {
|
||||
sourceCompatibility = JavaVersion.VERSION_11.toString()
|
||||
targetCompatibility = JavaVersion.VERSION_11.toString()
|
||||
}
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_11.toString()
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -4,12 +4,28 @@ kotlin.mpp.enableGranularSourceSetsMetadata=true
|
|||
kotlin.native.enableDependencyPropagation=false
|
||||
kotlin.mpp.stability.nowarn=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 \
|
||||
--add-opens jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
|
||||
--add-opens jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
|
||||
--add-opens jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
|
||||
--add-opens jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
|
||||
--add-opens jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \
|
||||
--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
|
||||
--add-opens jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
|
||||
--add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
|
||||
--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
|
||||
|
||||
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