mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-09-02 15:25:39 +00:00
feat(build): raise target bytecode to Java 17
This commit is contained in:
@@ -10,13 +10,13 @@ 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 {
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = JavaVersion.VERSION_11.toString()
|
jvmTarget = JavaVersion.VERSION_17.toString()
|
||||||
freeCompilerArgs =
|
freeCompilerArgs =
|
||||||
freeCompilerArgs +
|
freeCompilerArgs +
|
||||||
listOf(
|
listOf(
|
||||||
|
@@ -33,8 +33,8 @@ object AndroidCommon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility = JavaVersion.VERSION_11
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_11
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
|
|
||||||
testOptions {
|
testOptions {
|
||||||
|
@@ -23,12 +23,12 @@ class KotlinCommonPlugin : Plugin<Project> {
|
|||||||
val isAppModule = project.pluginManager.hasPlugin("com.android.application")
|
val isAppModule = project.pluginManager.hasPlugin("com.android.application")
|
||||||
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<KotlinCompile>().configureEach task@{
|
withType<KotlinCompile>().configureEach task@{
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
jvmTarget.set(JvmTarget.JVM_11)
|
jvmTarget.set(JvmTarget.JVM_17)
|
||||||
allWarningsAsErrors.set(true)
|
allWarningsAsErrors.set(true)
|
||||||
languageVersion.set(KotlinVersion.KOTLIN_1_8)
|
languageVersion.set(KotlinVersion.KOTLIN_1_8)
|
||||||
freeCompilerArgs.addAll(ADDITIONAL_COMPILER_ARGS)
|
freeCompilerArgs.addAll(ADDITIONAL_COMPILER_ARGS)
|
||||||
|
Reference in New Issue
Block a user