From d58b2e53238d42477ac246eefe9166192618180a Mon Sep 17 00:00:00 2001 From: Burke Davison <40617934+burkedavison@users.noreply.github.com> Date: Thu, 22 Dec 2022 08:50:01 -0500 Subject: [PATCH] fix: focus 'Running the Plugin' documentation on googleapis, not showcase (#1196) --- DEVELOPMENT.md | 82 ++++++-------------------------------------------- 1 file changed, 9 insertions(+), 73 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 6d27745a1e..1e7a583cb2 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -183,72 +183,13 @@ $ mvn compile -P update ## Running the Plugin -1. Clone [googleapis](https://github.com/googleapis/googleapis) and - [gapic-showcase](https://github.com/googleapis/gapic-showcase/). - -2. Copy the protos from Showcase into googleapis/google/showcase. - - ```sh - mkdir googleapis/google/showcase - cp -r gapic-showcase/schema/google/showcase/v1beta1 googleapis/google/showcase/v1beta1 - ``` - -3. Add the new microgenerator rules to - `googleapis/google/showcase/v1beta1/BUILD.bazel` file as follows: - - ```python - load( - "@com_google_googleapis_imports//:imports.bzl", - # Existing rules here. - "java_gapic_assembly_gradle_pkg", - "java_gapic_library", - "java_proto_library", - "proto_library_with_info", - ) - - proto_library_with_info( - name = "showcase_proto_with_info", - deps = [ - ":showcase_proto", - ], - ) - - java_proto_library( - name = "showcase_java_proto", - deps = [ - ":showcase_proto", - ], - ) - - # This should either replace the existing monolith target or have a unique name - # that includes "java_gapic". - java_gapic_library( - name = "showcase_java_gapic", - srcs = [":showcase_proto_with_info"], - grpc_service_config = "showcase_grpc_service_config.json", - test_deps = [ - ":showcase_java_grpc", - ], - deps = [ - ":showcase_java_proto", - ], - ) - - java_gapic_assembly_gradle_pkg( - # This name should be unique from the existing target name. - name = "google-cloud-showcase-v1beta1-java", - deps = [ - # This is the new microgen target above. - ":showcase_java_gapic", - # The following targets already exist. - ":showcase_java_grpc", - ":showcase_java_proto", - ":showcase_proto", - ], - ) - ``` - -4. Point to local gapic-generator-java +See also above section "Showcase Integration Testing". + +To generate a production GAPIC API: + +1. Clone [googleapis](https://github.com/googleapis/googleapis). + +2. Point to local gapic-generator-java Normally, googleapis's build pulls in googleapis/gapic-generator-java from the Internet: @@ -265,7 +206,7 @@ $ mvn compile -P update ) ``` - By replacing this portion using the built-in local_repository rule, you can mak + By replacing this portion using the built-in local_repository rule, you can make it refer to your local development repo: ``` @@ -275,12 +216,7 @@ $ mvn compile -P update ) ``` -5. Build the new target. - - ```sh - cd googleapis - bazel build //google/showcase/v1beta1:showcase_java_gapic - ``` +3. Build the new target. You can generate any client library based on the protos within googleapis. You just need the name of the service within the `java_gapic_assembly_gradle_pkg`