Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
fix: declare depenencies of API surfaces as api (#1535) (#1536)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
suztomo authored Oct 18, 2021
1 parent 48aa4a7 commit 8794b5c
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 29 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')
}

subprojects {
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'jacoco'
Expand Down Expand Up @@ -109,6 +109,7 @@ subprojects {
'maven.io_grpc_grpc_core': "io.grpc:grpc-core:${libraries['version.io_grpc']}",
'maven.io_grpc_grpc_context': "io.grpc:grpc-context:${libraries['version.io_grpc']}",
'maven.io_grpc_grpc_stub': "io.grpc:grpc-stub:${libraries['version.io_grpc']}",
'maven.io_grpc_grpc_api': "io.grpc:grpc-api:${libraries['version.io_grpc']}",
'maven.io_grpc_grpc_auth': "io.grpc:grpc-auth:${libraries['version.io_grpc']}",
'maven.io_grpc_grpc_protobuf': "io.grpc:grpc-protobuf:${libraries['version.io_grpc']}",
'maven.io_grpc_grpc_netty_shaded': "io.grpc:grpc-netty-shaded:${libraries['version.io_grpc']}",
Expand Down
4 changes: 2 additions & 2 deletions dependencies.properties
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ version.io_grpc=1.41.0
# 2) Replace all characters which are neither alphabetic nor digits with the underscore ('_') character
maven.com_google_api_grpc_proto_google_common_protos=com.google.api.grpc:proto-google-common-protos:2.4.1
maven.com_google_api_grpc_grpc_google_common_protos=com.google.api.grpc:grpc-google-common-protos:2.4.1
maven.com_google_auth_google_auth_library_oauth2_http=com.google.auth:google-auth-library-oauth2-http:0.27.0
maven.com_google_auth_google_auth_library_credentials=com.google.auth:google-auth-library-credentials:1.0.0
maven.com_google_auth_google_auth_library_oauth2_http=com.google.auth:google-auth-library-oauth2-http:1.2.1
maven.com_google_auth_google_auth_library_credentials=com.google.auth:google-auth-library-credentials:1.2.1
maven.io_opencensus_opencensus_api=io.opencensus:opencensus-api:0.28.0
maven.io_opencensus_opencensus_contrib_grpc_metrics=io.opencensus:opencensus-contrib-grpc-metrics:0.28.0
maven.io_opencensus_opencensus_contrib_http_util=io.opencensus:opencensus-contrib-http-util:0.28.0
Expand Down
22 changes: 12 additions & 10 deletions gax-grpc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ archivesBaseName = "gax-grpc"
project.version = "2.6.1-SNAPSHOT" // {x-version-update:gax-grpc:current}

dependencies {
implementation( project(':gax'),
libraries['maven.io_grpc_grpc_stub'],
libraries['maven.io_grpc_grpc_auth'],
libraries['maven.io_grpc_grpc_protobuf'],
api(project(':gax'),
libraries['maven.com_google_api_api_common'],
libraries['maven.com_google_api_grpc_proto_google_common_protos'],
libraries['maven.com_google_auth_google_auth_library_credentials'],
libraries['maven.com_google_guava_guava'],
libraries['maven.io_grpc_grpc_api'],
libraries['maven.org_threeten_threetenbp'])

implementation(libraries['maven.com_google_auth_google_auth_library_oauth2_http'],
libraries['maven.com_google_code_findbugs_jsr305'],
libraries['maven.org_threeten_threetenbp'],
libraries['maven.com_google_auth_google_auth_library_oauth2_http'],
libraries['maven.com_google_auth_google_auth_library_credentials'],
libraries['maven.com_google_api_grpc_proto_google_common_protos'],
libraries['maven.com_google_api_api_common'],
libraries['maven.io_grpc_grpc_alts'],
libraries['maven.io_grpc_grpc_auth'],
libraries['maven.io_grpc_grpc_netty_shaded'],
libraries['maven.io_grpc_grpc_alts'])
libraries['maven.io_grpc_grpc_protobuf'],
libraries['maven.io_grpc_grpc_stub'])

compileOnly libraries['maven.com_google_auto_value_auto_value']

Expand Down
21 changes: 11 additions & 10 deletions gax-httpjson/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,24 @@ archivesBaseName = "gax-httpjson"
project.version = "0.91.1-SNAPSHOT" // {x-version-update:gax-httpjson:current}

dependencies {
implementation( project(':gax'),
libraries['maven.com_google_protobuf'],
libraries['maven.com_google_protobuf_java_util'],
api(project(':gax'),
libraries['maven.com_google_api_api_common'],
libraries['maven.com_google_api_grpc_proto_google_common_protos'],
libraries['maven.com_google_auth_google_auth_library_credentials'],
libraries['maven.com_google_code_gson_gson'],
libraries['maven.com_google_guava_guava'],
libraries['maven.com_google_code_findbugs_jsr305'],
libraries['maven.org_threeten_threetenbp'],
libraries['maven.com_google_http_client_google_http_client'],
libraries['maven.com_google_protobuf'],
libraries['maven.org_threeten_threetenbp'])

implementation(libraries['maven.com_google_auth_google_auth_library_oauth2_http'],
libraries['maven.com_google_code_findbugs_jsr305'],
libraries['maven.com_google_http_client_google_http_client_gson'],
libraries['maven.com_google_auth_google_auth_library_oauth2_http'],
libraries['maven.com_google_auth_google_auth_library_credentials'],
libraries['maven.com_google_api_grpc_proto_google_common_protos'],
libraries['maven.com_google_api_api_common'])
libraries['maven.com_google_protobuf_java_util'])

compileOnly libraries['maven.com_google_auto_value_auto_value']

testImplementation( project(':gax').sourceSets.test.output,
testImplementation(project(':gax').sourceSets.test.output,
libraries['maven.junit_junit'],
libraries['maven.org_mockito_mockito_core'],
libraries['maven.com_google_truth_truth'])
Expand Down
14 changes: 8 additions & 6 deletions gax/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ archivesBaseName = "gax"
project.version = "2.6.1-SNAPSHOT" // {x-version-update:gax:current}

dependencies {
implementation (libraries['maven.com_google_guava_guava'],
api(libraries['maven.com_google_api_api_common'],
libraries['maven.com_google_auth_google_auth_library_credentials'],
libraries['maven.org_threeten_threetenbp'])

implementation(libraries['maven.com_google_auth_google_auth_library_oauth2_http'],
libraries['maven.com_google_code_findbugs_jsr305'],
libraries['maven.org_threeten_threetenbp'],
libraries['maven.com_google_auth_google_auth_library_oauth2_http'],
libraries['maven.com_google_api_api_common'],
libraries['maven.com_google_guava_guava'],
libraries['maven.io_opencensus_opencensus_api'])

compileOnly libraries['maven.com_google_auto_value_auto_value']

testImplementation( libraries['maven.junit_junit'],
testImplementation(libraries['maven.junit_junit'],
libraries['maven.org_mockito_mockito_core'],
libraries['maven.com_google_truth_truth'],
libraries['maven.com_google_auto_value_auto_value'] )
libraries['maven.com_google_auto_value_auto_value'])

annotationProcessor libraries['maven.com_google_auto_value_auto_value']
testAnnotationProcessor libraries['maven.com_google_auto_value_auto_value']
Expand Down

0 comments on commit 8794b5c

Please sign in to comment.