Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Commit afc4d04

Browse files
committed
remove use of svm
1 parent 99824e9 commit afc4d04

File tree

4 files changed

+9
-28
lines changed

4 files changed

+9
-28
lines changed

google-cloud-spanner/pom.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -348,15 +348,6 @@
348348
<scope>test</scope>
349349
</dependency>
350350

351-
<!-- Native Image dependencies-->
352-
<dependency>
353-
<groupId>org.graalvm.nativeimage</groupId>
354-
<artifactId>svm</artifactId>
355-
<version>${graalvm.version}</version>
356-
<scope>provided</scope>
357-
</dependency>
358-
<!-- Native Image dependencies-->
359-
360351
</dependencies>
361352

362353
<profiles>

google-cloud-spanner/src/main/java/com/google/cloud/spanner/nativeimage/SpannerFeature.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,9 @@
1717
package com.google.cloud.spanner.nativeimage;
1818

1919
import com.google.api.gax.nativeimage.NativeImageUtils;
20-
import com.oracle.svm.core.annotate.AutomaticFeature;
21-
import com.oracle.svm.core.configure.ResourcesRegistry;
22-
import org.graalvm.nativeimage.ImageSingletons;
2320
import org.graalvm.nativeimage.hosted.Feature;
24-
import org.graalvm.nativeimage.impl.ConfigurationCondition;
2521

2622
/** Registers Spanner library classes for reflection. */
27-
@AutomaticFeature
2823
final class SpannerFeature implements Feature {
2924

3025
private static final String SPANNER_CLASS = "com.google.spanner.v1.SpannerGrpc";
@@ -90,20 +85,6 @@ public void beforeAnalysis(BeforeAnalysisAccess access) {
9085
access, "com.google.spanner.admin.instance.v1.Instance");
9186
NativeImageUtils.registerClassForReflection(
9287
access, "com.google.spanner.admin.database.v1.RestoreInfo");
93-
94-
// Resources
95-
ResourcesRegistry resourcesRegistry = ImageSingletons.lookup(ResourcesRegistry.class);
96-
resourcesRegistry.addResources(
97-
ConfigurationCondition.alwaysTrue(),
98-
"\\Qcom/google/cloud/spanner/connection/ClientSideStatements.json\\E");
99-
resourcesRegistry.addResources(
100-
ConfigurationCondition.alwaysTrue(),
101-
"\\Qcom/google/cloud/spanner/connection/PG_ClientSideStatements.json\\E");
102-
resourcesRegistry.addResources(
103-
"\\Qcom/google/cloud/spanner/spi/v1/grpc-gcp-apiconfig.json\\E");
104-
resourcesRegistry.addResources(
105-
ConfigurationCondition.alwaysTrue(),
106-
"\\Qcom/google/cloud/spanner/connection/ITSqlScriptTest_TestQueryOptions.sql\\E");
10788
}
10889
}
10990

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Args = --features=com.google.cloud.spanner.nativeimage.SpannerFeature
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"resources": [
3+
{"pattern": "\\Qcom/google/cloud/spanner/connection/ClientSideStatements.json\\E"},
4+
{"pattern": "\\Qcom/google/cloud/spanner/connection/PG_ClientSideStatements.json\\E"},
5+
{"pattern": "\\Qcom/google/cloud/spanner/spi/v1/grpc-gcp-apiconfig.json\\E"},
6+
{"pattern": "\\Qcom/google/cloud/spanner/connection/ITSqlScriptTest_TestQueryOptions.sql\\E"}
7+
]
8+
}

0 commit comments

Comments
 (0)