File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
conventions/src/main/kotlin Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -73,12 +73,13 @@ tasks.withType<JavaCompile>().configureEach {
73
73
// We suppress the "options" warning because it prevents compilation on modern JDKs
74
74
" -Xlint:-options" ,
75
75
// jdk21 generates more serial warnings than previous versions
76
- " -Xlint:-serial" ,
77
-
78
- // Fail build on any warning
79
- " -Werror"
76
+ " -Xlint:-serial"
80
77
)
81
78
)
79
+ if (System .getProperty(" dev" ) != " true" ) {
80
+ // Fail build on any warning
81
+ compilerArgs.add(" -Werror" )
82
+ }
82
83
val defaultJavaVersion = otelJava.maxJavaVersionSupported.getOrElse(DEFAULT_JAVA_VERSION ).majorVersion.toInt()
83
84
if (Math .max(otelJava.minJavaVersionSupported.get().majorVersion.toInt(), defaultJavaVersion) >= 21 ) {
84
85
// new warning in jdk21
You can’t perform that action at this time.
0 commit comments