From 9a406f1b3e017c3e168e3680442e4fed2370ba2f Mon Sep 17 00:00:00 2001 From: dalbodeule <11470513+dalbodeule@users.noreply.github.com> Date: Fri, 7 Jun 2024 13:04:27 +0900 Subject: [PATCH] fix pdns api clients (retry 15x) reflect-config.json add --- build.gradle.kts | 3 ++- src/main/resources/reflect-config.json | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/reflect-config.json diff --git a/build.gradle.kts b/build.gradle.kts index 92b27d1..b9bfb95 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -81,7 +81,7 @@ tasks.withType { environment = mapOf( "BP_NATIVE_IMAGE" to "true", - "BP_NATIVE_IMAGE_BUILD_ARGUMENTS" to "-H:+UnlockExperimentalVMOptions", + "BP_NATIVE_IMAGE_BUILD_ARGUMENTS" to "-H:+UnlockExperimentalVMOptions -H:ReflectionConfigurationFiles=src/main/resources/reflect-config.json", "BP_JVM_TYPE" to "JDK", "BP_JVM_VERSION" to "21", ) @@ -100,5 +100,6 @@ tasks.named("bootRun") { graalvmNative { binaries.all { buildArgs.add("--initialize-at-build-time=org.slf4j.helpers") + buildArgs.add("-H:ReflectionConfigurationFiles=src/main/resources/reflect-config.json") } } \ No newline at end of file diff --git a/src/main/resources/reflect-config.json b/src/main/resources/reflect-config.json new file mode 100644 index 0000000..19e8134 --- /dev/null +++ b/src/main/resources/reflect-config.json @@ -0,0 +1,8 @@ +[ + { + "name": "space.mori.dnsapi.PowerDNSAPIError", + "allDeclaredConstructors": true, + "allDeclaredFields": true, + "allDeclaredMethods": true + } +] \ No newline at end of file