@@ -9,7 +9,7 @@ plugins {
99
1010repositories {
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
101101dependencies {
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} "
@@ -109,7 +115,8 @@ dependencies {
109115}
110116
111117task authzedProtos (type : Exec ) {
112- commandLine(" buf" , " export" , " buf.build/authzed/api:${ authzedProtoCommit} " , " -o" , bufDir)
118+ // NOTE: we exclude the com.google paths becamse the well-known types are brought in by other dependencies.
119+ commandLine(" buf" , " export" , " --exclude-path=google/api" , " buf.build/authzed/api:${ authzedProtoCommit} " , " -o" , bufDir)
113120}
114121
115122protobuf {
0 commit comments