From bb2a3be87291ae718ac0e8538025a0867a6b6ff6 Mon Sep 17 00:00:00 2001 From: ldetmer <1771267+ldetmer@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:48:01 -0500 Subject: [PATCH] fix: instantiate GaxProperties at build time to ensure we get the protobuf version (#3365) This should not vary from the runtime version for graalvm builds. Tested: ran ITVersion tests in graalvm and printed out the header to see full value exists --- .../native-image/com.google.api/gax/native-image.properties | 5 ++++- 1 file changed, 4 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..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,6 +1,9 @@ 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,\ + 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