We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e38fd24 commit e33eeddCopy full SHA for e33eedd
conventions/src/main/kotlin/otel.java-conventions.gradle.kts
@@ -73,12 +73,13 @@ tasks.withType<JavaCompile>().configureEach {
73
// We suppress the "options" warning because it prevents compilation on modern JDKs
74
"-Xlint:-options",
75
// jdk21 generates more serial warnings than previous versions
76
- "-Xlint:-serial",
77
-
78
- // Fail build on any warning
79
- "-Werror"
+ "-Xlint:-serial"
80
)
81
+ if (System.getProperty("dev") != "true") {
+ // Fail build on any warning
+ compilerArgs.add("-Werror")
82
+ }
83
val defaultJavaVersion = otelJava.maxJavaVersionSupported.getOrElse(DEFAULT_JAVA_VERSION).majorVersion.toInt()
84
if (Math.max(otelJava.minJavaVersionSupported.get().majorVersion.toInt(), defaultJavaVersion) >= 21) {
85
// new warning in jdk21
0 commit comments