Skip to content

Commit 5f54390

Browse files
author
Anuraag Agrawal
authored
Apply dependency management to gradle-protobuf-plugin classpath instead of implementation to prevent POM leak (#2601)
1 parent 3cc6dd5 commit 5f54390

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

build.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,15 @@ subprojects {
345345
}
346346
}
347347
}
348+
349+
afterEvaluate {
350+
// Classpath when compiling protos, we add dependency management directly
351+
// since it doesn't follow Gradle conventions of naming / properties.
352+
dependencies {
353+
add("compileProtoPath", platform(project(":dependencyManagement")))
354+
add("testCompileProtoPath", platform(project(":dependencyManagement")))
355+
}
356+
}
348357
}
349358

350359
plugins.withId("ru.vyarus.animalsniffer") {

exporters/jaeger/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ dependencies {
2828

2929
testImplementation project(':sdk:testing')
3030

31-
// Protobuf plugin seems to erroneously use the non-classpath configurations for resolving
32-
// dependencies.
33-
testImplementation enforcedPlatform(project(':dependencyManagement'))
34-
3531
testRuntimeOnly "io.grpc:grpc-netty-shaded"
3632
}
3733

proto/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ description = 'OpenTelemetry Proto'
1111
ext.moduleName = 'io.opentelemetry.proto'
1212

1313
dependencies {
14-
// Protobuf plugin seems to erroneously use the non-classpath configurations for resolving
15-
// dependencies.
16-
implementation enforcedPlatform(project(':dependencyManagement'))
17-
1814
api "com.google.protobuf:protobuf-java",
1915
"io.grpc:grpc-api",
2016
"io.grpc:grpc-protobuf",

0 commit comments

Comments
 (0)