Update build configurations for Java 17 compatibility and remove unused Modelfile
This commit is contained in:
parent
9451eb574f
commit
4fa9b80592
@ -21,6 +21,23 @@ plugins {
|
||||
alias(libs.plugins.vanniktech.mavenPublish) apply false
|
||||
}
|
||||
|
||||
// Some JVM dependencies are published as Java 21 bytecode. Keep the library's
|
||||
// Java 17 compilation target, but use a compatible runtime for its JVM tests.
|
||||
project(":lynglib") {
|
||||
afterEvaluate {
|
||||
val toolchains = extensions.getByType<org.gradle.jvm.toolchain.JavaToolchainService>()
|
||||
tasks.withType<Test>().configureEach {
|
||||
javaLauncher.set(toolchains.launcherFor {
|
||||
languageVersion.set(JavaLanguageVersion.of(21))
|
||||
})
|
||||
// An explicit jvmTest invocation should execute the suite rather than
|
||||
// silently reusing the previous test task outputs or build-cache entry.
|
||||
outputs.upToDateWhen { false }
|
||||
outputs.cacheIf { false }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Convenience alias to run the IntelliJ IDE with the Lyng plugin from the project root.
|
||||
// Usage: ./gradlew runIde
|
||||
// It simply delegates to :lyng-idea:runIde provided by the Gradle IntelliJ Plugin.
|
||||
|
||||
@ -16,7 +16,8 @@
|
||||
#
|
||||
|
||||
#Gradle
|
||||
org.gradle.jvmargs=-Xmx4096M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M"
|
||||
org.gradle.jvmargs=-Xmx4096M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M" --add-opens=java.base/java.lang=ALL-UNNAMED
|
||||
org.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64
|
||||
org.gradle.caching=true
|
||||
org.gradle.configuration-cache=true
|
||||
#Kotlin
|
||||
|
||||
@ -47,7 +47,11 @@ buildkonfig {
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(17)
|
||||
jvm()
|
||||
jvm {
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_17)
|
||||
}
|
||||
}
|
||||
androidTarget {
|
||||
publishLibraryVariants("release")
|
||||
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||
@ -297,8 +301,8 @@ android {
|
||||
minSdk = libs.versions.android.minSdk.get().toInt()
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user