Skip to content

Commit

Permalink
interop-testing: Hack runtimeOnly deps to be available at runtime (1.…
Browse files Browse the repository at this point in the history
…48.x backport)

RuntimeOnly dependencies have been missing since 3624d59. This is
because the implementation configuration extendsFrom the shadow
configuration, so any of the things like runtimeOnly are being lost.
This change isn't "correct" but it stops the bleeding with minimal cost.
It is probably incorrect to be using shadow plugin in interop-testing at
all.
  • Loading branch information
ejona86 authored Jul 11, 2022
1 parent fb2d5cf commit 5991239
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions interop-testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,17 @@ dependencies {
def xdsDependency = implementation project(':grpc-xds')

compileOnly libraries.javax.annotation
shadow configurations.implementation.getDependencies().minus(xdsDependency)
shadow project(path: ':grpc-xds', configuration: 'shadow')
// TODO(sergiitk): replace with com.google.cloud:google-cloud-logging
// Used instead of google-cloud-logging because it's failing
// due to a circular dependency on grpc.
// https://cloud.google.com/logging/docs/setup/java#the_javautillogging_handler
// Error example: "java.util.logging.ErrorManager: 1"
// Latest failing version com.google.cloud:google-cloud-logging:2.1.2
runtimeOnly group: 'io.github.devatherock', name: 'jul-jsonformatter', version: '1.1.0'
runtimeOnly libraries.opencensus.impl,
// TODO(ejona): These should be compileOnly, but that doesn't get picked up
// for the shadow runtime
implementation group: 'io.github.devatherock', name: 'jul-jsonformatter', version: '1.1.0'
implementation libraries.opencensus.impl,
libraries.netty.tcnative,
libraries.netty.tcnative.classes,
project(':grpc-grpclb'),
Expand All @@ -57,6 +58,7 @@ dependencies {
libraries.mockito.core,
libraries.okhttp
alpnagent libraries.jetty.alpn.agent
shadow configurations.implementation.getDependencies().minus(xdsDependency)
}

configureProtoCompilation()
Expand Down

0 comments on commit 5991239

Please sign in to comment.