feat(build): raise target bytecode to Java 17

This commit is contained in:
Harsh Shandilya 2023-05-16 16:14:10 +05:30
parent d940ba252e
commit 7cbc96161e
No known key found for this signature in database
3 changed files with 8 additions and 8 deletions

View file

@ -52,8 +52,8 @@ class AndroidCommonPlugin : Plugin<Project> {
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
testOptions {

View file

@ -28,15 +28,15 @@ class KotlinCommonPlugin : Plugin<Project> {
}
project.tasks.run {
withType<JavaCompile>().configureEach {
sourceCompatibility = JavaVersion.VERSION_11.toString()
targetCompatibility = JavaVersion.VERSION_11.toString()
sourceCompatibility = JavaVersion.VERSION_17.toString()
targetCompatibility = JavaVersion.VERSION_17.toString()
}
withType<KotlinJvmCompile>().configureEach {
compilerOptions {
allWarningsAsErrors.set(
project.providers.environmentVariable("GITHUB_WORKFLOW").isPresent
)
jvmTarget.set(JvmTarget.JVM_11)
jvmTarget.set(JvmTarget.JVM_17)
freeCompilerArgs.addAll(ADDITIONAL_COMPILER_ARGS)
languageVersion.set(KotlinVersion.KOTLIN_1_7)
}