diff --git a/.cloudbuild/graal-build-script.sh b/.cloudbuild/graal-build-script.sh
index e2d69573..8b71f7c2 100644
--- a/.cloudbuild/graal-build-script.sh
+++ b/.cloudbuild/graal-build-script.sh
@@ -6,4 +6,5 @@ gu install native-image
--threads 3 \
--batch-mode \
--quiet \
+ --projects \!com.example:cloud-functions-sample \
--file google-cloud-graalvm-samples
diff --git a/.cloudbuild/graal-build.yaml b/.cloudbuild/graal-build.yaml
index 9ff82c6b..877fd6f4 100644
--- a/.cloudbuild/graal-build.yaml
+++ b/.cloudbuild/graal-build.yaml
@@ -12,7 +12,7 @@ steps:
fi
# Build the sample images
- - name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
+ - name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
entrypoint: bash
args: ['./.cloudbuild/graal-build-script.sh']
@@ -48,50 +48,50 @@ steps:
waitFor: [spanner-emulator, firestore-emulator, datastore-emulator, bigtable-emulator]
# Run the tests
- - name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
+ - name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/bigquery-sample/target/com.example.bigquerysampleapplication' ]
- - name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
+ - name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [
'./google-cloud-graalvm-samples/graalvm-samples-client-library/cloud-sql-sample/target/com.example.cloudsqlsampleapplication',
'-Dinstance=cloud-graalvm-support-ci:us-east1:test-instance',
'-Dpassword=root'
]
- - name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
+ - name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/pubsub-sample/target/com.example.pubsubsampleapplication' ]
- - name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
+ - name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/storage-sample/target/com.example.storagesampleapplication' ]
- - name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
+ - name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/logging-sample/target/com.example.loggingsampleapplication' ]
- - name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
+ - name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/secretmanager-sample/target/com.example.secretmanagersampleapplication' ]
- - name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
+ - name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/tasks-sample/target/com.example.taskssampleapplication' ]
- - name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
+ - name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/trace-sample/target/com.example.tracesampleapplication' ]
- - name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
+ - name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/firestore-sample/target/com.example.firestoresampleapplication' ]
env:
- 'FIRESTORE_EMULATOR_HOST=firestore-emulator:9010'
- - name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
+ - name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/spanner-sample/target/com.example.spannersampleapplication' ]
env:
- 'SPANNER_EMULATOR_HOST=spanner-emulator:9010'
- - name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
+ - name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/bigtable-sample/target/com.example.bigtablesampleapplication' ]
env:
- 'BIGTABLE_EMULATOR_HOST=bigtable-emulator:9010'
- - name: ghcr.io/graalvm/graalvm-ce:java11-21.0.0.2
+ - name: ghcr.io/graalvm/graalvm-ce:java11-21.2.0
args: [ './google-cloud-graalvm-samples/graalvm-samples-client-library/datastore-sample/target/com.example.datastoresampleapplication' ]
env:
- 'DATASTORE_EMULATOR_HOST=http://datastore-emulator:9010'
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index a1f174bd..befc653c 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -56,7 +56,7 @@ jobs:
- name: Set up GraalVM Compiler
uses: rinx/setup-graalvm-ce@v0.0.5
with:
- graalvm-version: "21.0.0.2"
+ graalvm-version: "21.2.0"
java-version: "java11"
native-image: "true"
diff --git a/README.md b/README.md
index b78f99a0..686f89cd 100644
--- a/README.md
+++ b/README.md
@@ -24,9 +24,10 @@ This dependency contains the GraalVM configurations to provide out-of-the-box su
To compile with GraalVM (native-image), ensure the client library version in your project is supported by `google-cloud-graalvm-support`.
-| GraalVM Support version | *`libraries-bom` version | `grpc-netty-shaded` version |
-|-------------------------|:-------------------------|-----------------------------|
-| `0.4.0` | `11.0.0` or later | `1.32.1` or later |
+| GraalVM Support version | GraalVM Compiler Version | *`libraries-bom` version | `grpc-netty-shaded` version |
+|-------------------------|--------------------------|:-------------------------|-----------------------------|
+| `0.5.0` | `>= 21.2.0` | `20.8.0` or later | `1.39.0` or later |
+| `0.4.0` | `>= 21.0.0` | `11.0.0` or later | `1.32.1` or later |
Typically, you can just depend on the latest versions of the client libraries to get something working if you are not sure about what versions of (transitive) dependencies are being used by your project.
diff --git a/google-cloud-graalvm-samples/graalvm-samples-client-library/cloud-functions-sample/pom.xml b/google-cloud-graalvm-samples/graalvm-samples-client-library/cloud-functions-sample/pom.xml
index f6543e97..f483bc2c 100644
--- a/google-cloud-graalvm-samples/graalvm-samples-client-library/cloud-functions-sample/pom.xml
+++ b/google-cloud-graalvm-samples/graalvm-samples-client-library/cloud-functions-sample/pom.xml
@@ -9,6 +9,7 @@
4.0.0
+ com.example
cloud-functions-sample
diff --git a/google-cloud-graalvm-support/src/main/java/com/google/cloud/graalvm/features/NativeImageUtils.java b/google-cloud-graalvm-support/src/main/java/com/google/cloud/graalvm/features/NativeImageUtils.java
index 214e86fc..1f4be497 100644
--- a/google-cloud-graalvm-support/src/main/java/com/google/cloud/graalvm/features/NativeImageUtils.java
+++ b/google-cloud-graalvm-support/src/main/java/com/google/cloud/graalvm/features/NativeImageUtils.java
@@ -28,10 +28,8 @@
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.logging.Logger;
-import org.graalvm.nativeimage.ImageSingletons;
import org.graalvm.nativeimage.hosted.Feature.FeatureAccess;
import org.graalvm.nativeimage.hosted.RuntimeReflection;
-import org.graalvm.nativeimage.impl.RuntimeReflectionSupport;
/**
* Internal class offering helper methods for registering methods/classes for reflection.
@@ -125,12 +123,10 @@ public static void registerForUnsafeFieldAccess(
FeatureAccess access, String className, String... fields) {
Class> clazz = access.findClassByName(className);
if (clazz != null) {
- RuntimeReflectionSupport reflectionSupport =
- ImageSingletons.lookup(RuntimeReflectionSupport.class);
RuntimeReflection.register(clazz);
for (String fieldName : fields) {
try {
- reflectionSupport.register(false, true, clazz.getDeclaredField(fieldName));
+ RuntimeReflection.register(clazz.getDeclaredField(fieldName));
} catch (NoSuchFieldException ex) {
LOGGER.warning("Failed to register field " + fieldName + " for class " + className);
LOGGER.warning(ex.getMessage());
diff --git a/google-cloud-graalvm-support/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-graalvm-support/native-image.properties b/google-cloud-graalvm-support/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-graalvm-support/native-image.properties
index cd24ad9d..21e4923b 100644
--- a/google-cloud-graalvm-support/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-graalvm-support/native-image.properties
+++ b/google-cloud-graalvm-support/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-graalvm-support/native-image.properties
@@ -9,5 +9,6 @@ Args = -H:+AllowIncompleteClasspath --report-unsupported-elements-at-runtime \
io.grpc.netty.shaded.io.grpc.netty,\
io.grpc.netty.shaded.io.netty.channel.epoll,\
io.grpc.netty.shaded.io.netty.channel.unix,\
+ io.grpc.internal.RetriableStream,\
com.google.api.client.googleapis.services.AbstractGoogleClientRequest$ApiClientVersion,\
com.google.cloud.firestore.FirestoreImpl
diff --git a/pom.xml b/pom.xml
index a8cd46d9..1a8c7174 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
1.8
1.8
- 21.1.0
+ 21.2.0
Google Cloud GraalVM Support Parent