File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -29,10 +29,6 @@ android {
2929 targetCompatibility JavaVersion . VERSION_1_8
3030 }
3131
32- kotlinOptions {
33- jvmTarget = ' 1.8'
34- }
35-
3632 sourceSets {
3733 main. java. srcDirs + = ' src/main/kotlin'
3834 }
@@ -82,14 +78,20 @@ android {
8278 }
8379}
8480
85- tasks. withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile ). configureEach {
81+ kotlin {
82+ compilerOptions {
83+ jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget . JVM_1_8
84+ }
85+ }
86+
87+ tasks. withType(org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile ). configureEach {
8688 // Compile Kotlin with `-Werror`... but only in release builds, so that it
8789 // doesn't get in the way of quick local experiments for debugging.
8890 //
8991 // The string-searching makes this a bit of a mess, but it works.
9092 // Better would be if we can add this to android.buildTypes.release above;
9193 // but on a first attempt that didn't work (it affected debug builds too).
92- kotlinOptions . allWarningsAsErrors = name. contains(" Release" )
94+ compilerOptions . allWarningsAsErrors = name. contains(" Release" )
9395}
9496
9597flutter {
You can’t perform that action at this time.
0 commit comments