Set language level 1.8 correctly also to Kotlin compiler,

removed unused variables.
This commit is contained in:
tzugen 2021-04-18 22:21:34 +02:00
parent 42967ef45f
commit b5806cbbbf
No known key found for this signature in database
GPG Key ID: 61E9C34BC10EC930
5 changed files with 23 additions and 5 deletions

View File

@ -6,6 +6,13 @@ android {
baselineFile file("lint-baseline.xml")
abortOnError true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {

View File

@ -4,6 +4,13 @@ android {
buildFeatures {
buildConfig = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {

View File

@ -17,7 +17,12 @@ android {
targetSdkVersion versions.targetSdk
}
kotlinOptions {
jvmTarget = "1.8"
}
compileOptions {
// Sets Java compatibility to Java 8
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
@ -44,8 +49,6 @@ android {
}
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
tasks.withType(Test) {
useJUnitPlatform()

View File

@ -3,9 +3,6 @@ apply plugin: 'kotlin'
apply plugin: 'jacoco'
apply from: "${project.rootDir}/gradle_scripts/code_quality.gradle"
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceSets {
main.java.srcDirs += "${projectDir}/src/main/kotlin"
test.java.srcDirs += "${projectDir}/src/test/kotlin"

View File

@ -54,6 +54,10 @@ android {
kotlinOptions {
jvmTarget = "1.8"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
tasks.withType(Test) {