Skip to content

Commit

Permalink
fix: native image configs for google-http-java-client (#1893)
Browse files Browse the repository at this point in the history
* fix: native image configs for google-http-java-client
  • Loading branch information
mpeddada1 committed Nov 9, 2023
1 parent 1d37fa3 commit 1acedf7
Show file tree
Hide file tree
Showing 21 changed files with 1,752 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ graalvm17)
;;
graalvmA)
# Run Unit and Integration Tests with Native Image
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Pnative-deps test -pl '!google-http-client-appengine'
RETURN_CODE=$?
;;
graalvmB)
# Run Unit and Integration Tests with Native Image
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Pnative-deps test -pl '!google-http-client-appengine'
RETURN_CODE=$?
;;
samples)
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/presubmit/graalvm-native-a.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ env_vars: {
env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-it-service-account"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[
{
"name": "org.apache.commons.logging.impl.LogFactoryImpl",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true,
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "org.apache.commons.logging.impl.Log4JLogger",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "org.apache.commons.logging.impl.Jdk14Logger",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "org.apache.commons.logging.impl.SimpleLog",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "org.apache.commons.logging.impl.Jdk13LumberjackLogger",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "org.apache.commons.logging.LogFactory",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"name": "com.google.api.client.json.GenericJson",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.google.api.client.util.ArrayMap",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allPublicMethods": true,
"allDeclaredFields": true
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[
{
"name": "com.google.api.client.json.GenericJson",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "java.util.HashMap",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "java.util.LinkedList",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "java.lang.Object",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allPublicMethods": true,
"allDeclaredFields": true
},
{
"name": "com.google.api.client.util.ArrayMap",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allPublicMethods": true,
"allDeclaredFields": true
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Args=--initialize-at-build-time=com.google.api.client.json.jackson2.JacksonFactoryTest \
--initialize-at-build-time=com.google.api.client.json.jackson2.JacksonGeneratorTest \
--initialize-at-build-time=com.fasterxml.jackson.core.io.SerializedString \
--initialize-at-build-time=com.fasterxml.jackson.core.io.CharTypes \
--initialize-at-build-time=com.fasterxml.jackson.core.JsonFactory \
--initialize-at-build-time=com.fasterxml.jackson.core.io.JsonStringEncoder \
--initialize-at-build-time=com.google.api.client.util.StringUtils
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"name": "com.google.api.client.protobuf.SimpleProto$TestMessage",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allPublicMethods": true,
"allDeclaredFields": true
}
]
12 changes: 12 additions & 0 deletions google-http-client-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,16 @@
<scope>provided</scope>
</dependency>
</dependencies>

<profiles>
<profile>
<id>native-deps</id>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>

0 comments on commit 1acedf7

Please sign in to comment.