From cec329fd0aa1e9bd8b0af9ab52d22d2c424bd05d Mon Sep 17 00:00:00 2001 From: ldetmer <1771267+ldetmer@users.noreply.github.com> Date: Tue, 12 Nov 2024 15:36:54 -0500 Subject: [PATCH 1/4] fix: instantiate GaxProperties when running to ensure we get the protobuf version. This should not vary from runtime for graalvm builds. --- .../native-image/com.google.api/gax/native-image.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gax-java/gax/src/main/resources/META-INF/native-image/com.google.api/gax/native-image.properties b/gax-java/gax/src/main/resources/META-INF/native-image/com.google.api/gax/native-image.properties index afad5895db..b1fb5ad654 100644 --- a/gax-java/gax/src/main/resources/META-INF/native-image/com.google.api/gax/native-image.properties +++ b/gax-java/gax/src/main/resources/META-INF/native-image/com.google.api/gax/native-image.properties @@ -1,6 +1,7 @@ Args = --enable-url-protocols=https,http \ --initialize-at-build-time=org.conscrypt,\ - org.junit.platform.engine.TestTag \ + org.junit.platform.engine.TestTag,\ + com.google.api.gax.core.GaxProperties \ --features=com.google.api.gax.nativeimage.OpenCensusFeature,\ com.google.api.gax.nativeimage.GoogleJsonClientFeature \ --add-modules=jdk.httpserver From 0a2992c7444dcadf0049ebc3927c42ba0481dbd5 Mon Sep 17 00:00:00 2001 From: ldetmer <1771267+ldetmer@users.noreply.github.com> Date: Tue, 12 Nov 2024 16:33:35 -0500 Subject: [PATCH 2/4] fix: instantiate GaxProperties when running to ensure we get the protobuf version. This should not vary from runtime for graalvm builds. --- .../native-image/com.google.api/gax/native-image.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gax-java/gax/src/main/resources/META-INF/native-image/com.google.api/gax/native-image.properties b/gax-java/gax/src/main/resources/META-INF/native-image/com.google.api/gax/native-image.properties index b1fb5ad654..ab8e2b8bc3 100644 --- a/gax-java/gax/src/main/resources/META-INF/native-image/com.google.api/gax/native-image.properties +++ b/gax-java/gax/src/main/resources/META-INF/native-image/com.google.api/gax/native-image.properties @@ -1,7 +1,8 @@ Args = --enable-url-protocols=https,http \ --initialize-at-build-time=org.conscrypt,\ org.junit.platform.engine.TestTag,\ - com.google.api.gax.core.GaxProperties \ + com.google.api.gax.core.GaxProperties, \ + com.google.common.base.Platform \ --features=com.google.api.gax.nativeimage.OpenCensusFeature,\ com.google.api.gax.nativeimage.GoogleJsonClientFeature \ --add-modules=jdk.httpserver From 51c28aa825603ae71c45b3bb3f21eb0f767bad3e Mon Sep 17 00:00:00 2001 From: ldetmer <1771267+ldetmer@users.noreply.github.com> Date: Wed, 13 Nov 2024 09:29:15 -0500 Subject: [PATCH 3/4] fix: instantiate GaxProperties when running to ensure we get the protobuf version. This should not vary from runtime for graalvm builds. --- .../native-image/com.google.api/gax/native-image.properties | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gax-java/gax/src/main/resources/META-INF/native-image/com.google.api/gax/native-image.properties b/gax-java/gax/src/main/resources/META-INF/native-image/com.google.api/gax/native-image.properties index ab8e2b8bc3..b1fb5ad654 100644 --- a/gax-java/gax/src/main/resources/META-INF/native-image/com.google.api/gax/native-image.properties +++ b/gax-java/gax/src/main/resources/META-INF/native-image/com.google.api/gax/native-image.properties @@ -1,8 +1,7 @@ Args = --enable-url-protocols=https,http \ --initialize-at-build-time=org.conscrypt,\ org.junit.platform.engine.TestTag,\ - com.google.api.gax.core.GaxProperties, \ - com.google.common.base.Platform \ + com.google.api.gax.core.GaxProperties \ --features=com.google.api.gax.nativeimage.OpenCensusFeature,\ com.google.api.gax.nativeimage.GoogleJsonClientFeature \ --add-modules=jdk.httpserver From a2b4a6b1f71823f5c3cd98e96c942ec38c2210e6 Mon Sep 17 00:00:00 2001 From: ldetmer <1771267+ldetmer@users.noreply.github.com> Date: Wed, 13 Nov 2024 09:48:31 -0500 Subject: [PATCH 4/4] fix: instantiate GaxProperties when running to ensure we get the protobuf version. This should not vary from runtime for graalvm builds. --- .../native-image/com.google.api/gax/native-image.properties | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gax-java/gax/src/main/resources/META-INF/native-image/com.google.api/gax/native-image.properties b/gax-java/gax/src/main/resources/META-INF/native-image/com.google.api/gax/native-image.properties index b1fb5ad654..75b882d8a4 100644 --- a/gax-java/gax/src/main/resources/META-INF/native-image/com.google.api/gax/native-image.properties +++ b/gax-java/gax/src/main/resources/META-INF/native-image/com.google.api/gax/native-image.properties @@ -1,7 +1,9 @@ Args = --enable-url-protocols=https,http \ --initialize-at-build-time=org.conscrypt,\ org.junit.platform.engine.TestTag,\ - com.google.api.gax.core.GaxProperties \ + com.google.api.gax.core.GaxProperties,\ + com.google.common.base.Platform,\ + com.google.common.base.Platform$JdkPatternCompiler \ --features=com.google.api.gax.nativeimage.OpenCensusFeature,\ com.google.api.gax.nativeimage.GoogleJsonClientFeature \ --add-modules=jdk.httpserver