mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-15 06:27:02 +05:30
feat(build): raise target bytecode to Java 17
This commit is contained in:
parent
d940ba252e
commit
7cbc96161e
3 changed files with 8 additions and 8 deletions
|
@ -13,12 +13,12 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
plugins { `kotlin-dsl` }
|
plugins { `kotlin-dsl` }
|
||||||
|
|
||||||
tasks.withType<JavaCompile>().configureEach {
|
tasks.withType<JavaCompile>().configureEach {
|
||||||
sourceCompatibility = JavaVersion.VERSION_11.toString()
|
sourceCompatibility = JavaVersion.VERSION_17.toString()
|
||||||
targetCompatibility = JavaVersion.VERSION_11.toString()
|
targetCompatibility = JavaVersion.VERSION_17.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<KotlinCompile>().configureEach {
|
tasks.withType<KotlinCompile>().configureEach {
|
||||||
compilerOptions { jvmTarget.set(JvmTarget.JVM_11) }
|
compilerOptions { jvmTarget.set(JvmTarget.JVM_17) }
|
||||||
}
|
}
|
||||||
|
|
||||||
gradlePlugin {
|
gradlePlugin {
|
||||||
|
|
|
@ -52,8 +52,8 @@ class AndroidCommonPlugin : Plugin<Project> {
|
||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility = JavaVersion.VERSION_11
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_11
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
|
|
||||||
testOptions {
|
testOptions {
|
||||||
|
|
|
@ -28,15 +28,15 @@ class KotlinCommonPlugin : Plugin<Project> {
|
||||||
}
|
}
|
||||||
project.tasks.run {
|
project.tasks.run {
|
||||||
withType<JavaCompile>().configureEach {
|
withType<JavaCompile>().configureEach {
|
||||||
sourceCompatibility = JavaVersion.VERSION_11.toString()
|
sourceCompatibility = JavaVersion.VERSION_17.toString()
|
||||||
targetCompatibility = JavaVersion.VERSION_11.toString()
|
targetCompatibility = JavaVersion.VERSION_17.toString()
|
||||||
}
|
}
|
||||||
withType<KotlinJvmCompile>().configureEach {
|
withType<KotlinJvmCompile>().configureEach {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
allWarningsAsErrors.set(
|
allWarningsAsErrors.set(
|
||||||
project.providers.environmentVariable("GITHUB_WORKFLOW").isPresent
|
project.providers.environmentVariable("GITHUB_WORKFLOW").isPresent
|
||||||
)
|
)
|
||||||
jvmTarget.set(JvmTarget.JVM_11)
|
jvmTarget.set(JvmTarget.JVM_17)
|
||||||
freeCompilerArgs.addAll(ADDITIONAL_COMPILER_ARGS)
|
freeCompilerArgs.addAll(ADDITIONAL_COMPILER_ARGS)
|
||||||
languageVersion.set(KotlinVersion.KOTLIN_1_7)
|
languageVersion.set(KotlinVersion.KOTLIN_1_7)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue