Skip to content

Commit 1a0bcb7

Browse files
authored
Switch grpc dependency to minimal required (#510)
1 parent fb053de commit 1a0bcb7

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

buildSrc/src/main/groovy/com.google.api-ads.java-conventions.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ dependencies {
153153
implementation 'com.google.api:gax'
154154
implementation 'com.google.api:gax-grpc'
155155
implementation 'com.google.protobuf:protobuf-java'
156-
implementation 'io.grpc:grpc-all'
156+
implementation 'io.grpc:grpc-stub'
157+
implementation 'io.grpc:grpc-protobuf'
158+
implementation 'com.google.auth:google-auth-library-oauth2-http'
157159
annotationProcessor 'com.google.auto.service:auto-service:1.0-rc2'
158160
testImplementation 'junit:junit:4.13.1'
159161
}

google-ads/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ dependencies {
7474
testImplementation 'com.google.api:gax-grpc::testlib'
7575
testImplementation 'io.grpc:grpc-context:1.30.0'
7676
testImplementation 'com.google.truth:truth:0.27'
77+
implementation 'com.google.auto.value:auto-value-annotations:1.7.3'
7778
testImplementation 'com.google.auto.value:auto-value-annotations:1.7.3'
7879
shadeTest 'junit:junit:4.13.1'
7980
}
@@ -214,6 +215,9 @@ task copyThirdPartySources(type: Copy) {
214215
.resolutionResult
215216
.allDependencies
216217
.stream()
218+
// Avoids failing the build with cryptic errors when a bad dependency is
219+
// added.
220+
.filter { it.hasProperty("selected") != null}
217221
// Avoids attempting to download sources for projects in the build.
218222
.filter { !(it.selected.id instanceof ProjectComponentIdentifier) }
219223
// Avoids attempting to download sources for Maven BOMs.

0 commit comments

Comments
 (0)