From 8fe6fe630e1970f2fac1a986853231fef188a3a4 Mon Sep 17 00:00:00 2001 From: Vadym Matsishevskyi <25311427+vam-google@users.noreply.github.com> Date: Wed, 1 Apr 2020 11:11:49 -0700 Subject: [PATCH] chore: Migrate pubsub synth.py to bazel (#124) This PR migrates only synth.py but does not commit the regenerated files. The generation was tested and it works, the updated files are not commited due to breaking changes not related to bazel migration. --- synth.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/synth.py b/synth.py index 3ee915346..24cfcbf56 100644 --- a/synth.py +++ b/synth.py @@ -15,24 +15,19 @@ """This script is used to synthesize generated parts of this library.""" import synthtool as s -import synthtool.gcp as gcp import synthtool.languages.java as java AUTOSYNTH_MULTIPLE_COMMITS = True -gapic = gcp.GAPICGenerator() - service = 'pubsub' versions = ['v1'] -config_pattern = '/google/pubsub/artman_pubsub.yaml' for version in versions: - java.gapic_library( + java.bazel_library( service=service, version=version, - config_pattern=config_pattern, - package_pattern='com.google.{service}.{version}', - gapic=gapic, + proto_path=f'google/{service}/{version}', + bazel_target=f'//google/{service}/{version}:google-cloud-{service}-{version}-java', ) s.replace( '**/stub/SubscriberStubSettings.java',