Skip to content
Development
Skill

/build-native-image-gradle

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.

From plugin
graal
22k4 skills

Claude Code

$ npx -y skills add oracle/graal --skill build-native-image-gradle --agent claude-code

SKILL.md

build-native-image-gradle.SKILL.md
name: build-native-image-gradle
description: 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.

Gradle Native Image Build

Prerequisites

  • Set `JAVA_HOME` to a GraalVM JDK installation so Gradle Native Build Tools can find `native-image`.
  • Do not require `GRAALVM_HOME` in the normal case. Only mention it if the user already relies on it or their environment needs an explicit override.
  • Apply the `application`, `java-library`, or `java` plugin along with `org.graalvm.buildtools.native`.

Plugin Setup

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"
}

Build and Run

./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 image

Build or Runtime Failures

If 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](references/native-image-build-gradle-options.md).

Native Testing

If `nativeTest` fails or you need to configure native JUnit tests or custom test suites, see [references/testing.md](references/testing.md).

Missing Reachability Metadata

If a build or runtime error reports missing reflection, resource, serialization, or JNI registrations, see [references/reachability-metadata.md](references/reachability-metadata.md).

Reference Files

| Topic | File | |-------|------| | DSL options and build arguments | [references/native-image-build-gradle-options.md](references/native-image-build-gradle-options.md) | | Missing reachability metadata | [references/reachability-metadata.md](references/reachability-metadata.md) | | Native testing | [references/testing.md](references/testing.md) |

Read more
@oracle
Ships withgraal

GraalVM compiles applications into native executables that start instantly, scale fast, and use fewer compute resources ๐Ÿš€

Stars on GitHub

Momentum

stars in total
21.8k
Star history of oracle/graal on GitHub, a chart by star-history.com

Other skills on graal.

build-native-image-maven

build-native-image-mavโ€ฆ

Build GraalVM native images using the native-maven-plugin (org.graalvm.buildtools). Use this skill to build Java applicationsโ€ฆ

@oracle@oracleInstall Skill
building-native-image

building-native-image

Build and troubleshoot GraalVM Native Image applications. Use this skill to build Java applications with GraalVM Native Image,โ€ฆ

@oracle@oracleInstall Skill
update-libcontainer

update-libcontainer

Reimport Native Image's vendored libcontainer from a newer JDK while preserving local adaptations in a reviewable commit stack.โ€ฆ

@oracle@oracleInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, orโ€ฆ

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills3w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android โ€” semantic ARIA roles and labels,โ€ฆ

ecc3w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commitsโ€ฆ

react12d252k
@facebook@facebookInstall Skill

Questions about build-native-image-gradle.

Which coding agents can use build-native-image-gradle?
build-native-image-gradle installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.