Build GraalVM native images using Gradle Native Build Tools. Use this skill to build Java applications with Gradle, configure native-image build.gradle settings, or resolve build or runtime issues.
71
89%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
The canonical home for this skill is build-native-image-gradle in oracle/graal
JAVA_HOME to a GraalVM JDK installation so Gradle Native Build Tools can find native-image.GRAALVM_HOME in the normal case. Only mention it if the user already relies on it or their environment needs an explicit override.application, java-library, or java plugin along with org.graalvm.buildtools.native.Groovy DSL:
plugins {
id 'application'
id 'org.graalvm.buildtools.native' version '0.11.1'
}Kotlin DSL:
plugins {
application
id("org.graalvm.buildtools.native") version "0.11.1"
}./gradlew nativeCompile # Build to build/native/nativeCompile/
./gradlew nativeRun # Build and run the native executable
./gradlew nativeTest # Build and run JUnit tests as a native imageIf the build fails with class initialization, linking errors, memory issues, or the binary behaves incorrectly at runtime, see references/native-image-build-gradle-options.md.
If nativeTest fails or you need to configure native JUnit tests or custom test suites, see references/testing.md.
If a build or runtime error reports missing reflection, resource, serialization, or JNI registrations, see references/reachability-metadata.md.
| Topic | File |
|---|---|
| DSL options and build arguments | references/native-image-build-gradle-options.md |
| Missing reachability metadata | references/reachability-metadata.md |
| Native testing | references/testing.md |
384c27b
Canonical home
since Sep 8, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.