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