@@ -162,15 +162,22 @@ configurations {
162162 // "latest.release" or "+" versions (e.g. transitive deps) gets pinned to a concrete
163163 // version from the JSON file.
164164 if (otelProps.testLatestDeps) {
165- // Apply latestDepTestLibrary overrides and pinned versions to every resolvable
166- // configuration. Both maps only contain entries the module author explicitly opted into
167- // (`latestDepTestLibrary(...)` declarations and `library`/`testLibrary` artifacts pinned
168- // in latest-dep-versions.json), and the lookups are no-ops for unrelated artifacts and
169- // for concrete versions — so broad application costs nothing but keeps every dynamic
170- // version in the build reproducible, including custom JvmTestSuite source sets and
171- // `compileClasspath` entries rewritten via dependencySubstitution (e.g. gwt-2.0).
165+ // Pinning and overrides must NOT leak into build-tool configurations like Zinc (the
166+ // Scala compiler), where forcing e.g. scala-library to a JSON-pinned version breaks
167+ // compilation. They also must not affect e.g. japicmp's `tempConfig`, which resolves
168+ // `opentelemetry-instrumentation-bom:latest.release` directly against Maven Central.
169+ // Use an allow-list of configuration names rather than a deny-list so new build-tool
170+ // configurations stay safe by default.
171+ //
172+ // Allow-list:
173+ // - any configuration whose name contains "test" (case-insensitive) — covers `test`,
174+ // `latestDepTest`, and custom JvmTestSuite source sets like `testDubbo`,
175+ // `version20Test`, `play24Test`, etc.
176+ // - the main `compileClasspath` — so modules using `dependencySubstitution` to swap
177+ // groups for the agent's compile classpath (e.g. gwt-2.0) get pinned versions.
172178 configureEach {
173179 if (! isCanBeResolved) return @configureEach
180+ if (! name.contains(" test" , ignoreCase = true ) && name != " compileClasspath" ) return @configureEach
174181 resolutionStrategy.eachDependency {
175182 // latestDepTestLibrary overrides take priority over pinned versions
176183 val override = latestDepTestLibraryOverrides[" ${requested.group} :${requested.name} " ]
0 commit comments