Skip to content

Commit 840babf

Browse files
committed
Keep gwt-user and gwt-dev off the test classpath
The previous refactor moved gwt-user, gwt-dev and gwt-servlet from compileOnly to library(), which adds dependencies to both compileOnly and testImplementation. That dragged gwt-dev's uber-jar onto the test classpath, where its bundled (old) copy of org.apache.commons.io.IOUtils took precedence over the resolved commons-io 2.22.0, breaking testcontainers' shaded docker-java client (NoSuchMethodError on IOUtils.toString(InputStream, Charset)). Restore the pre-refactor split: gwt-user and gwt-dev are compileOnly, only gwt-servlet uses library() since it's also needed at test runtime. dependencySubstitution still rewrites all three coordinates in latest-deps mode, and the broadened compileClasspath pinning keeps the substituted artifacts pinned.
1 parent 0036885 commit 840babf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

instrumentation/gwt-2.0/javaagent/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ if (otelProps.testLatestDeps) {
4444

4545
dependencies {
4646
// these are needed for compileGwt task
47-
library("com.google.gwt:gwt-user:2.0.0")
48-
library("com.google.gwt:gwt-dev:2.0.0")
47+
compileOnly("com.google.gwt:gwt-user:2.0.0")
48+
compileOnly("com.google.gwt:gwt-dev:2.0.0")
49+
// gwt-servlet is also needed at test runtime
4950
library("com.google.gwt:gwt-servlet:2.0.0")
5051

5152
testInstrumentation(project(":instrumentation:servlet:servlet-3.0:javaagent"))

0 commit comments

Comments
 (0)