Skip to content

Commit 15e01f4

Browse files
feat(jdbc/mysql-j-8): Add native image support for jdbc/mysql-j-8 (#966)
* fix(jdbc/mysql-j-5): testing native image support for jdbc/mysql-j-5 module * Update run_tests_graalvm_native.sh * register resource * rename resource file path to follow convention * bring back jdbc/postgresql * add configs to CloudSqlFeature * fix formatting Co-authored-by: Shubha Rajan <shubhadayini@google.com>
1 parent d7dadb5 commit 15e01f4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.kokoro/tests/run_tests_graalvm_native.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ declare -i return_code=0
4444
# jdbc/mysql-j-5 jdbc/mysql-j-8 jdbc/sqlserver r2dbc/sqlserver r2dbc/sqlserver
4545
# r2dbc/mysql
4646
# https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/issues/824
47-
for test_directory in jdbc/postgres; do
47+
for test_directory in jdbc/postgres jdbc/mysql-j-8; do
4848
pushd ${test_directory}
4949
echo -e "******************** Running tests in ${test_directory} ********************\n"
5050
# Dependency convergence enforcer rule would fail with the junit dependencies
@@ -56,4 +56,4 @@ for test_directory in jdbc/postgres; do
5656
echo -e "******************** Tests complete in ${test_directory}, result: $result ********************\n"
5757
popd
5858
done
59-
exit ${return_code}
59+
exit ${return_code}

core/src/main/java/com/google/cloud/sql/nativeimage/CloudSqlFeature.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ public void beforeAnalysis(BeforeAnalysisAccess access) {
8383

8484
NativeImageUtils.registerConstructorsForReflection(
8585
access, "com.mysql.cj.conf.url.SingleConnectionUrl");
86+
resourcesRegistry.addResources(ConfigurationCondition.alwaysTrue(),
87+
"\\Qcom/mysql/cj/util/TimeZoneMapping.properties\\E");
8688

8789
// for mysql-j-5
8890
NativeImageUtils.registerConstructorsForReflection(

0 commit comments

Comments
 (0)