-
Notifications
You must be signed in to change notification settings - Fork 107
fix: declare depenencies of API surfaces as api #1535
Conversation
gax-httpjson/build.gradle
Outdated
archivesBaseName = "gax-httpjson" | ||
|
||
// TODO: Populate this from dependencies.properties version property (for proper Gradle-Bazel sync) | ||
project.version = "0.91.1-SNAPSHOT" // {x-version-update:gax-httpjson:current} | ||
|
||
dependencies { | ||
implementation( project(':gax'), | ||
libraries['maven.com_google_protobuf'], | ||
api ( project(':gax'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least gax's StatusCode is exposed as API surface.
gax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/HttpJsonCallContext.java
Line 351 in 0fe20f3
public Set<StatusCode.Code> getRetryableCodes() { |
gax-grpc/build.gradle
Outdated
archivesBaseName = "gax-grpc" | ||
|
||
// TODO: Populate this from dependencies.properties version property (for proper Gradle-Bazel sync) | ||
project.version = "2.6.1-SNAPSHOT" // {x-version-update:gax-grpc:current} | ||
|
||
dependencies { | ||
implementation( project(':gax'), | ||
libraries['maven.io_grpc_grpc_stub'], | ||
api (project(':gax'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least gax's StatusCode is exposed as API surface.
public Set<StatusCode.Code> getRetryableCodes() { |
gax-grpc/build.gradle
Outdated
implementation( project(':gax'), | ||
libraries['maven.io_grpc_grpc_stub'], | ||
api (project(':gax'), | ||
libraries['maven.com_google_auth_google_auth_library_credentials']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
com.google.auth.Credentials is part of API surface
public GrpcCallContext withCredentials(Credentials newCredentials) { |
gax-httpjson/build.gradle
Outdated
implementation( project(':gax'), | ||
libraries['maven.com_google_protobuf'], | ||
api ( project(':gax'), | ||
libraries['maven.com_google_auth_google_auth_library_credentials']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
com.google.auth.Credentials is part of API surface.
gax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/HttpJsonCallContext.java
Line 327 in 0fe20f3
public Credentials getCredentials() { |
gax/build.gradle
Outdated
archivesBaseName = "gax" | ||
|
||
// TODO: Populate this from dependencies.properties version property (for proper Gradle-Bazel sync) | ||
project.version = "2.6.1-SNAPSHOT" // {x-version-update:gax:current} | ||
|
||
dependencies { | ||
api libraries['maven.com_google_auth_google_auth_library_credentials'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
com.google.auth.Credentials is part of API surface #1534 (comment)
Adding more artifacts to be declared as 'api' because they appear in public API surface. See the comment of the following issue for the analysis: googleapis#1534
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chanseokoh PTAL.
* deps: declaring the latest auth library version * fix: declare API surface as api configuration Fix googleapis#1534 * fix: declare API surface's dependencies as 'api' Adding more artifacts to be declared as 'api' because they appear in public API surface. See the comment of the following issue for the analysis: googleapis#1534 * refactor: move java-library declaration to top-level build.gradle
* deps: declaring the latest auth library version * fix: declare API surface as api configuration Fix #1534 * fix: declare API surface's dependencies as 'api' Adding more artifacts to be declared as 'api' because they appear in public API surface. See the comment of the following issue for the analysis: #1534 * refactor: move java-library declaration to top-level build.gradle
🤖 I have created a release \*beep\* \*boop\* --- ### [2.6.1](https://www.github.com/googleapis/gax-java/compare/2.6.0...v2.6.1) (2021-10-18) ### Bug Fixes * declare depenencies of API surfaces as api ([#1535](https://www.github.com/googleapis/gax-java/issues/1535)) ([#1536](https://www.github.com/googleapis/gax-java/issues/1536)) ([8794b5c](https://www.github.com/googleapis/gax-java/commit/8794b5c322659af5a339c40552f16d71b7605cdf)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Fixes: #1534.
https://docs.gradle.org/current/userguide/publishing_maven.html says:
If a class is exposed as API surface, then the dependency should be declared using 'api'.
google-auth-library-oauth2-http
For the classes in com.google.auth.oauth2 (com.google.auth.oauth2.QuotaProjectIdProvider, com.google.auth.oauth2.ComputeEngineCredentials, com.google.auth.oauth2.GoogleCredentials, com.google.auth.oauth2.ServiceAccountCredentials, com.google.auth.oauth2.ServiceAccountJwtAccessCredentials, com.google.auth.oauth2.QuotaProjectIdProvider), I didn't find any of them used as API surface. Therefore "implementation" makes sense.
google-auth-library-credentials
I found com.google.auth.Credentials class in google-auth-library-credentials is exposed in gax. (This artifact is not declared in gax's build.gradle.)
Other artifacts
org_threeten_threetenbp
The artifact defines
org.threeten.bp.Duration
.gax exposes it in its public API
gax-java/gax/src/main/java/com/google/api/gax/batching/BatchingSettings.java
Line 103 in 2ce5a2f
gax-grpc uses it in its public API
gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/GrpcCallContext.java
Line 202 in 0fe20f3
gax-httpjson uses it in its public API
gax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/HttpJsonCallContext.java
Line 247 in 0fe20f3
com_google_api_api_common
gax uses
com.google.api.core.ApiFuture
in its public APIgax-java/gax/src/main/java/com/google/api/gax/batching/ThresholdBatcher.java
Line 217 in ff4b61e
gax-grpc uses it
gax-java/gax-grpc/src/main/java/com/google/longrunning/OperationsClient.java
Line 598 in 68761a7
gax-httpjson uses it
gax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/HttpJsonChannel.java
Line 38 in 8d45d18
io_opencensus_opencensus_api
It doesn't appear in the API surfaces of gax, gax-grpc, and gax-httpjson.
grpc-api
gax-grpc uses it in public API
gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/ResponseMetadataHandler.java
Line 44 in 4b3f21b
grpc-auth, grpc-protobuf, grpc-netty-shaded, grpc-alts, grpc-stub
They are not in public API.
guava
gax-grpc uses
com.google.common.collect.ImmutableList
in public APIgax-java/gax-grpc/src/main/java/com/google/longrunning/stub/OperationsStubSettings.java
Line 353 in 68761a7
gax-httpjson uses it in public API
gax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/longrunning/stub/OperationsStubSettings.java
Line 398 in 2d76bff
com_google_api_grpc_proto_google_common_protos
gax-grpc uses
com.google.longrunning.Operation
in public APIgax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/GrpcCallableFactory.java
Line 184 in 763aafb
gax-httpjson uses
com.google.longrunning.ListOperationsRequest
in public APIgax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/longrunning/stub/OperationsStub.java
Line 54 in 2d76bff
com_google_protobuf
gax-httpjson uses
com.google.protobuf.TypeRegistry
in public APIgax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/ApiMessageHttpResponseParser.java
Line 109 in 95ca348
com_google_protobuf_java_util
It's not used as public API.
com_google_code_gson_gson
gax-httpjson uses
com.google.gson.JsonElement
in public APIgax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/FieldMaskedSerializer.java
Line 51 in 8f9d6ce
com_google_http_client_google_http_client
gax-httpjson uses
com.google.api.client.http.HttpTransport
in public APIgax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/ManagedHttpJsonChannel.java
Line 170 in 8f48b70
com_google_http_client_google_http_client_gson
This is not used in public API.