File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -46,10 +46,29 @@ allprojects {
46
46
}
47
47
}
48
48
49
+ val setAllWarningsAsError = providers.gradleProperty(" kotlin_Werror_override" ).map {
50
+ when (it) {
51
+ " enable" -> true
52
+ " disable" -> false
53
+ else -> error(" Unexpected value for 'kotlin_Werror_override' property: $it " )
54
+ }
55
+ }
56
+
49
57
tasks.withType(KotlinCompilationTask ::class ).configureEach {
50
58
compilerOptions {
51
- allWarningsAsErrors = true
52
- freeCompilerArgs.add(" -Xexpect-actual-classes" )
59
+ if (setAllWarningsAsError.orNull != false ) {
60
+ allWarningsAsErrors = true
61
+ } else {
62
+ freeCompilerArgs.addAll(
63
+ " -Wextra" ,
64
+ " -Xuse-fir-experimental-checkers"
65
+ )
66
+ }
67
+ freeCompilerArgs.addAll(
68
+ " -Xexpect-actual-classes" ,
69
+ " -Xreport-all-warnings" ,
70
+ " -Xrender-internal-diagnostic-names"
71
+ )
53
72
}
54
73
if (this is KotlinJsCompile ) {
55
74
compilerOptions {
You can’t perform that action at this time.
0 commit comments