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 {
29
29
targetCompatibility JavaVersion . VERSION_1_8
30
30
}
31
31
32
- kotlinOptions {
33
- jvmTarget = ' 1.8'
34
- }
35
-
36
32
sourceSets {
37
33
main. java. srcDirs + = ' src/main/kotlin'
38
34
}
@@ -82,14 +78,20 @@ android {
82
78
}
83
79
}
84
80
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 {
86
88
// Compile Kotlin with `-Werror`... but only in release builds, so that it
87
89
// doesn't get in the way of quick local experiments for debugging.
88
90
//
89
91
// The string-searching makes this a bit of a mess, but it works.
90
92
// Better would be if we can add this to android.buildTypes.release above;
91
93
// 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" )
93
95
}
94
96
95
97
flutter {
You can’t perform that action at this time.
0 commit comments