From 92bdf4e19a8c3df365c067142a7aa112a004be20 Mon Sep 17 00:00:00 2001 From: Min Zhu Date: Thu, 29 Aug 2024 10:39:07 -0400 Subject: [PATCH] docs: Update DEVELOPMENT.md (#3126) due to changes in googleapis/WORKSPACE [here](https://github.com/googleapis/googleapis/commit/cf16946acfefb6f5a33122802ebbaebf5bb45645), adjust to dev guide. --- gapic-generator-java/DEVELOPMENT.md | 51 +++++++++++++---------------- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/gapic-generator-java/DEVELOPMENT.md b/gapic-generator-java/DEVELOPMENT.md index d097e491fc..b1fd40c2dc 100644 --- a/gapic-generator-java/DEVELOPMENT.md +++ b/gapic-generator-java/DEVELOPMENT.md @@ -99,19 +99,7 @@ To generate a production GAPIC API: Replace the following section in googleapis ``` - _gapic_generator_java_version = "2.13.0" - - maven_install( - artifacts = [ - "com.google.api:gapic-generator-java:" + _gapic_generator_java_version, - ], - #Update this False for local development - fail_on_missing_checksum = True, - repositories = [ - "m2Local", - "https://repo.maven.apache.org/maven2/", - ] - ) + _gapic_generator_java_version = "2.43.0" http_archive( name = "gapic_generator_java", @@ -129,20 +117,8 @@ To generate a production GAPIC API: to ``` - _gapic_generator_java_version = "2.15.4-SNAPSHOT" - - maven_install( - artifacts = [ - "com.google.api:gapic-generator-java:" + _gapic_generator_java_version, - ], - #Update this False for local development - fail_on_missing_checksum = False, - repositories = [ - "m2Local", - "https://repo.maven.apache.org/maven2/", - ] - ) - + _gapic_generator_java_version = "2.43.1-SNAPSHOT" + local_repository( name = "gapic_generator_java", path = "/absolute/path/to/your/local/sdk-platform-java", @@ -155,7 +131,26 @@ To generate a production GAPIC API: ) ``` - Note: At the time of writing, the gapic-generator version was `2.13.0`. Update the version to the latest version in the pom.xml + Note: At the time of writing, the gapic-generator version was `2.43.0`. Update the version to the latest version in the pom.xml + + Then update `fail_on_missing_checksum = False` in this `maven_install` target: + + ``` + maven_install( + artifacts = [ + "com.google.api:gapic-generator-java:" + _gapic_generator_java_version, + ] + PROTOBUF_MAVEN_ARTIFACTS + + IO_GRPC_GRPC_JAVA_ARTIFACTS, + generate_compat_repositories = True, + override_targets = IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS, + #Update this False for local development + fail_on_missing_checksum = True, + repositories = [ + "m2Local", + "https://repo.maven.apache.org/maven2/", + ] + ) + ``` 3. Build the new target.