Browse Source

Fix vertx-http-client testLatestDeps Xlint errors (#5228)

* Fix vertx-http-client testLatestDeps

* fix
Trask Stalnaker 3 years ago
parent
commit
953fd106a7

+ 5 - 4
instrumentation/vertx/vertx-http-client/vertx-http-client-3.0/javaagent/build.gradle.kts

@@ -14,10 +14,9 @@ muzzle {
 dependencies {
   library("io.vertx:vertx-core:3.0.0")
 
-  compileOnly("io.vertx:vertx-codegen:3.0.0")
-  testCompileOnly("io.vertx:vertx-codegen:3.0.0")
-  compileOnly("io.vertx:vertx-docgen:3.0.0")
-  testCompileOnly("io.vertx:vertx-docgen:3.0.0")
+  // vertx-codegen and vertx-docgen dependencies are needed for Xlint's annotation checking
+  library("io.vertx:vertx-codegen:3.0.0")
+  testLibrary("io.vertx:vertx-docgen:3.0.0")
 
   compileOnly("com.google.auto.value:auto-value-annotations")
   annotationProcessor("com.google.auto.value:auto-value")
@@ -32,6 +31,8 @@ dependencies {
   // 3.9.7 Requires Netty 4.1.60, no other version works with it.
   latestDepTestLibrary(enforcedPlatform("io.netty:netty-bom:4.1.60.Final"))
   latestDepTestLibrary("io.vertx:vertx-core:3.+")
+  latestDepTestLibrary("io.vertx:vertx-codegen:3.+")
+  latestDepTestLibrary("io.vertx:vertx-docgen:3.+")
 }
 
 tasks {

+ 2 - 2
instrumentation/vertx/vertx-http-client/vertx-http-client-4.0/javaagent/build.gradle.kts

@@ -14,8 +14,8 @@ muzzle {
 dependencies {
   library("io.vertx:vertx-core:4.0.0")
 
-  compileOnly("io.vertx:vertx-codegen:4.0.0")
-  testCompileOnly("io.vertx:vertx-codegen:4.0.0")
+  // vertx-codegen dependency is needed for Xlint's annotation checking
+  library("io.vertx:vertx-codegen:4.0.0")
 
   implementation(project(":instrumentation:vertx:vertx-http-client:vertx-http-client-common:javaagent"))