Skip to content

Commit e99ceb5

Browse files
committed
Exclude well-known types from dependencies
1 parent 6252c22 commit e99ceb5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99

1010
repositories {
1111
// The Google mirror is less flaky than mavenCentral()
12-
maven { url "https://maven-central.storage-download.googleapis.com/maven2/" }
12+
maven { url = "https://maven-central.storage-download.googleapis.com/maven2/" }
1313
mavenCentral()
1414
mavenLocal()
1515
}
@@ -100,7 +100,13 @@ sourceSets { main {
100100

101101
dependencies {
102102
implementation("io.grpc:grpc-protobuf:${grpcVersion}") {
103+
// We want the same version of protobuf-java as was used in the compilation step,
104+
// so we overwrite this dependency.
103105
exclude group: 'com.google.protobuf', module: 'protobuf-java'
106+
// These classes are included by the buf generation step, so we
107+
// don't need the external dependency that brings them in. This also ensures
108+
// that the definitions line up with what's expected.
109+
exclude group: 'com.google.api.grpc', module: 'proto-google-common-protos'
104110
}
105111
api "com.google.protobuf:protobuf-java:${protocVersion}"
106112
implementation "io.grpc:grpc-stub:${grpcVersion}"

0 commit comments

Comments
 (0)