Apply dependency management to gradle-protobuf-plugin classpath instead of implementation to prevent POM leak (#2601)

This commit is contained in:
Anuraag Agrawal 2021-01-29 11:11:49 +09:00 committed by GitHub
parent 3cc6dd5bae
commit 5f54390f09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 8 deletions

View File

@ -345,6 +345,15 @@ subprojects {
}
}
}
afterEvaluate {
// Classpath when compiling protos, we add dependency management directly
// since it doesn't follow Gradle conventions of naming / properties.
dependencies {
add("compileProtoPath", platform(project(":dependencyManagement")))
add("testCompileProtoPath", platform(project(":dependencyManagement")))
}
}
}
plugins.withId("ru.vyarus.animalsniffer") {

View File

@ -28,10 +28,6 @@ dependencies {
testImplementation project(':sdk:testing')
// Protobuf plugin seems to erroneously use the non-classpath configurations for resolving
// dependencies.
testImplementation enforcedPlatform(project(':dependencyManagement'))
testRuntimeOnly "io.grpc:grpc-netty-shaded"
}

View File

@ -11,10 +11,6 @@ description = 'OpenTelemetry Proto'
ext.moduleName = 'io.opentelemetry.proto'
dependencies {
// Protobuf plugin seems to erroneously use the non-classpath configurations for resolving
// dependencies.
implementation enforcedPlatform(project(':dependencyManagement'))
api "com.google.protobuf:protobuf-java",
"io.grpc:grpc-api",
"io.grpc:grpc-protobuf",