This repository was archived by the owner on Dec 3, 2023. It is now read-only.
File tree 3 files changed +13
-3
lines changed
native-image-support/src/main
java/com/google/cloud/nativeimage/features/clients
resources/META-INF/native-image/com.google.cloud/google-cloud-core
3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 25
25
@ AutomaticFeature
26
26
final class OpenCensusFeature implements Feature {
27
27
28
- private static final String OPEN_CENSUS_CLASS = "io.opencensus.impl.tags.TagsComponentImpl" ;
28
+ private static final String TAGS_COMPONENT_CLASS = "io.opencensus.impl.tags.TagsComponentImpl" ;
29
+ private static final String STATS_COMPONENT_CLASS = "io.opencensus.impl.stats.StatsComponentImpl" ;
29
30
30
31
@ Override
31
32
public void beforeAnalysis (BeforeAnalysisAccess access ) {
32
- if (access .findClassByName (OPEN_CENSUS_CLASS ) != null ) {
33
+ if (access .findClassByName (STATS_COMPONENT_CLASS ) != null ) {
34
+ registerForReflectiveInstantiation (access , STATS_COMPONENT_CLASS );
35
+ }
36
+ if (access .findClassByName (TAGS_COMPONENT_CLASS ) != null ) {
33
37
registerForReflectiveInstantiation (access , "io.opencensus.impl.metrics.MetricsComponentImpl" );
34
38
registerForReflectiveInstantiation (access , "io.opencensus.impl.tags.TagsComponentImpl" );
35
39
registerForReflectiveInstantiation (access , "io.opencensus.impl.trace.TraceComponentImpl" );
Original file line number Diff line number Diff line change 27
27
final class SpannerFeature implements Feature {
28
28
29
29
private static final String SPANNER_CLASS = "com.google.spanner.v1.SpannerGrpc" ;
30
+ private static final String SPANNER_TEST_CLASS = "com.google.cloud.spanner.GceTestEnvConfig" ;
30
31
31
32
@ Override
32
33
public void beforeAnalysis (BeforeAnalysisAccess access ) {
34
+ Class <?> spannerTestClass = access .findClassByName (SPANNER_TEST_CLASS );
35
+ if (spannerTestClass != null ) {
36
+ NativeImageUtils .registerConstructorsForReflection (access , SPANNER_TEST_CLASS );
37
+ }
33
38
Class <?> spannerClass = access .findClassByName (SPANNER_CLASS );
34
39
if (spannerClass != null ) {
35
40
NativeImageUtils .registerClassHierarchyForReflection (
Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ Args = --allow-incomplete-classpath \
2
2
--enable-url-protocols =https,http \
3
3
--initialize-at-build-time =org.conscrypt,\
4
4
org.slf4j.LoggerFactory,\
5
- org.junit.platform.engine.TestTag \
5
+ org.junit.platform.engine.TestTag,\
6
+ com.google.cloud.spanner.IntegrationTestEnv \
6
7
--initialize-at-run-time =io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl,\
7
8
io.grpc.netty.shaded.io.netty.internal.tcnative.SSL,\
8
9
io.grpc.netty.shaded.io.netty.internal.tcnative.CertificateVerifier,\
You can’t perform that action at this time.
0 commit comments