From 4054f11a7577ceff9759353c538888d4afbe757b Mon Sep 17 00:00:00 2001 From: Min Zhu Date: Tue, 20 Aug 2024 11:02:51 -0400 Subject: [PATCH 1/4] docs: Update DEVELOPMENT.md --- gapic-generator-java/DEVELOPMENT.md | 58 ++++++++++++++--------------- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/gapic-generator-java/DEVELOPMENT.md b/gapic-generator-java/DEVELOPMENT.md index d097e491fc..5ebf9bff5f 100644 --- a/gapic-generator-java/DEVELOPMENT.md +++ b/gapic-generator-java/DEVELOPMENT.md @@ -99,24 +99,12 @@ 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", - strip_prefix = "sdk-platform-java-%s" % _gapic_generator_java_version, - urls = ["https://github.com/googleapis/sdk-platform-java/archive/v%s.zip" % _gapic_generator_java_version], + strip_prefix = "sdk-platform-java-test-grpc", + urls = ["https://github.com/googleapis/sdk-platform-java/archive/refs/heads/test-grpc.zip"], ) # gax-java is part of sdk-platform-java repository @@ -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,9 +131,29 @@ 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, + "com.google.protobuf:protobuf-javalite:3." + _protobuf_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. +4. 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` From 14a9788c41b9f2edfe6c3d5f9e29a53a6d97af6e Mon Sep 17 00:00:00 2001 From: Min Zhu Date: Wed, 28 Aug 2024 11:34:16 -0400 Subject: [PATCH 2/4] update from cl/666825099, removing protobuf-javalite line. --- gapic-generator-java/DEVELOPMENT.md | 1 - 1 file changed, 1 deletion(-) diff --git a/gapic-generator-java/DEVELOPMENT.md b/gapic-generator-java/DEVELOPMENT.md index 5ebf9bff5f..37a802a1d3 100644 --- a/gapic-generator-java/DEVELOPMENT.md +++ b/gapic-generator-java/DEVELOPMENT.md @@ -139,7 +139,6 @@ To generate a production GAPIC API: maven_install( artifacts = [ "com.google.api:gapic-generator-java:" + _gapic_generator_java_version, - "com.google.protobuf:protobuf-javalite:3." + _protobuf_version, ] + PROTOBUF_MAVEN_ARTIFACTS + IO_GRPC_GRPC_JAVA_ARTIFACTS, generate_compat_repositories = True, From 04737c31665a8ff9fd389432a4f052618e0d4d26 Mon Sep 17 00:00:00 2001 From: Min Zhu Date: Wed, 28 Aug 2024 11:50:09 -0400 Subject: [PATCH 3/4] fix: gapic_generator_java use correct versioned. --- gapic-generator-java/DEVELOPMENT.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gapic-generator-java/DEVELOPMENT.md b/gapic-generator-java/DEVELOPMENT.md index 37a802a1d3..25b7d90575 100644 --- a/gapic-generator-java/DEVELOPMENT.md +++ b/gapic-generator-java/DEVELOPMENT.md @@ -103,8 +103,8 @@ To generate a production GAPIC API: http_archive( name = "gapic_generator_java", - strip_prefix = "sdk-platform-java-test-grpc", - urls = ["https://github.com/googleapis/sdk-platform-java/archive/refs/heads/test-grpc.zip"], + strip_prefix = "sdk-platform-java-%s" % _gapic_generator_java_version, + urls = ["https://github.com/googleapis/sdk-platform-java/archive/v%s.zip" % _gapic_generator_java_version], ) # gax-java is part of sdk-platform-java repository From 390591be759833d8de6510030d89336f0b616cea Mon Sep 17 00:00:00 2001 From: Min Zhu Date: Wed, 28 Aug 2024 15:58:14 -0400 Subject: [PATCH 4/4] typo. --- gapic-generator-java/DEVELOPMENT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gapic-generator-java/DEVELOPMENT.md b/gapic-generator-java/DEVELOPMENT.md index 25b7d90575..b1fd40c2dc 100644 --- a/gapic-generator-java/DEVELOPMENT.md +++ b/gapic-generator-java/DEVELOPMENT.md @@ -152,7 +152,7 @@ To generate a production GAPIC API: ) ``` -4. Build the new target. +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`