This repository was archived by the owner on Sep 26, 2023. It is now read-only.
fix: declare depenencies of API surfaces as api#1535
Merged
suztomo merged 4 commits intogoogleapis:mainfrom Oct 18, 2021
Merged
fix: declare depenencies of API surfaces as api#1535suztomo merged 4 commits intogoogleapis:mainfrom
suztomo merged 4 commits intogoogleapis:mainfrom
Conversation
suztomo
commented
Oct 16, 2021
gax-httpjson/build.gradle
Outdated
| dependencies { | ||
| implementation( project(':gax'), | ||
| libraries['maven.com_google_protobuf'], | ||
| api ( project(':gax'), |
Member
Author
There was a problem hiding this comment.
At least gax's StatusCode is exposed as API surface.
gax-grpc/build.gradle
Outdated
| dependencies { | ||
| implementation( project(':gax'), | ||
| libraries['maven.io_grpc_grpc_stub'], | ||
| api (project(':gax'), |
Member
Author
There was a problem hiding this comment.
At least gax's StatusCode is exposed as API surface.
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']) |
Member
Author
There was a problem hiding this comment.
com.google.auth.Credentials is part of API surface
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']) |
Member
Author
There was a problem hiding this comment.
com.google.auth.Credentials is part of API surface.
gax/build.gradle
Outdated
| project.version = "2.6.1-SNAPSHOT" // {x-version-update:gax:current} | ||
|
|
||
| dependencies { | ||
| api libraries['maven.com_google_auth_google_auth_library_credentials'] |
Member
Author
There was a problem hiding this comment.
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
suztomo
commented
Oct 18, 2021
chanseokoh
approved these changes
Oct 18, 2021
suztomo
added a commit
to suztomo/gax-java
that referenced
this pull request
Oct 18, 2021
* 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
suztomo
added a commit
that referenced
this pull request
Oct 18, 2021
* 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
gcf-merge-on-green bot
pushed a commit
that referenced
this pull request
Oct 18, 2021
🤖 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.ApiFuturein 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.ImmutableListin 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.Operationin 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.ListOperationsRequestin 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.TypeRegistryin 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.JsonElementin 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.HttpTransportin 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.