Skip to content

Commit 22f1464

Browse files
authored
fix(native): initialize classes at build-time to fix Native Image compilation (#874)
1 parent a9bd9d8 commit 22f1464

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

  • java-storage-nio/google-cloud-nio/src/main/resources/META-INF/native-image/com/google/cloud/google-cloud-nio
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Using META-INF/services with Native Image compilation results in
2+
# FileSystemProvider being initialized at build time. This results
3+
# CloudStorageFileSystemProvider and some classes referenced by
4+
# this class (for example, StorageOptions, StorageOptionsUtil,
5+
# DefaultStorageRetryStrategy) being unexpectedly and recursively initialized at
6+
# build time.
7+
Args = --initialize-at-build-time=com.google.cloud.storage.contrib.nio.CloudStorageFileSystemProvider,\
8+
com.google.cloud.storage.contrib.nio.CloudStorageConfiguration,\
9+
com.google.cloud.storage.contrib.nio.CloudStorageFileSystem,\
10+
com.google.cloud.storage.contrib.nio.StorageOptionsUtil,\
11+
com.google.cloud.storage.StorageException,\
12+
com.google.cloud.storage.StorageOptions,\
13+
com.google.cloud.storage.DefaultStorageRetryStrategy,\
14+
com.google.api.client.http.OpenCensusUtils,\
15+
com.google.api.client.http.GenericUrl,\
16+
com.google.api.client.http.HttpRequest,\
17+
com.google.api.client.http.HttpMediaType,\
18+
com.google.api.client.http.javanet.NetHttpTransport,\
19+
com.google.api.client.util.Data,\
20+
com.google.api.client.util.DateTime,\
21+
com.google.auth.oauth2,\
22+
io.opencensus.trace,\
23+
com.google.api.client.util.escape.CharEscapers,\
24+
com.google.api.client.util.escape.PercentEscaper,\
25+
io.opencensus.contrib.http.util.CloudTraceFormat,\
26+
io.grpc.Context,\
27+
io.grpc.Context$LazyStorage,\
28+
io.grpc.ThreadLocalContextStorage,\
29+
com.google.common.cache.LocalCache,\
30+
com.google.common.cache.CacheBuilder,\
31+
com.google.common.math.IntMath$1,\
32+
com.google.common.collect.RegularImmutableMap,\
33+
com.google.gson.stream.JsonReader,\
34+
com.google.api.client.json.gson.GsonParser$1,\
35+
com.google.api.client.json.JsonParser$1,\
36+
com.google.cloud.PlatformInformation,\
37+
com.google.cloud.ExceptionHandler,\
38+
org.threeten.bp.Duration,\
39+
com.google.common.io.BaseEncoding$Base16Encoding,\
40+
com.google.common.io.BaseEncoding$Base64Encoding,\
41+
com.google.common.io.BaseEncoding,\
42+
com.google.common.io.BaseEncoding$StandardBaseEncoding,\
43+
com.google.api.client.util.PemReader

0 commit comments

Comments
 (0)