Skip to content

Commit

Permalink
fix: declare API surface's dependencies as 'api'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
suztomo committed Oct 18, 2021
1 parent b3c3595 commit 65027e3
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 29 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
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
23 changes: 12 additions & 11 deletions gax-grpc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,21 @@ archivesBaseName = "gax-grpc"
project.version = "2.6.1-SNAPSHOT" // {x-version-update:gax-grpc:current}

dependencies {
api (project(':gax'),
libraries['maven.com_google_auth_google_auth_library_credentials'])

implementation(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_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
22 changes: 11 additions & 11 deletions gax-httpjson/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ archivesBaseName = "gax-httpjson"
project.version = "0.91.1-SNAPSHOT" // {x-version-update:gax-httpjson:current}

dependencies {
api ( project(':gax'),
libraries['maven.com_google_auth_google_auth_library_credentials'])

implementation( 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_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: 7 additions & 7 deletions gax/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ archivesBaseName = "gax"
project.version = "2.6.1-SNAPSHOT" // {x-version-update:gax:current}

dependencies {
api libraries['maven.com_google_auth_google_auth_library_credentials']
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_guava_guava'],
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 65027e3

Please sign in to comment.