Skip to content

Commit eb665b7

Browse files
committed
Suppressing protobuf generated code warnings about the usage of deprecated methods
1 parent 946988a commit eb665b7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

opamp-client/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ java {
1111
targetCompatibility = JavaVersion.VERSION_1_8
1212
}
1313

14+
tasks.withType<JavaCompile>().configureEach {
15+
with(options) {
16+
// Suppressing warnings about the usage of deprecated methods.
17+
// This is needed because the Protobuf plugin (com.google.protobuf) generates code that uses deprecated methods.
18+
compilerArgs.add("-Xlint:-deprecation")
19+
}
20+
}
21+
1422
dependencies {
1523
implementation("com.google.protobuf:protobuf-java")
1624
annotationProcessor("com.google.auto.value:auto-value")

0 commit comments

Comments
 (0)