build-native-image-gradle
하는 일
이 스킬은 Java 개발자가 Gradle 프로젝트를 빠르게 시작되는 네이티브 프로그램으로 바꾸도록 돕습니다. 더 가볍고 빠른 Java 앱을 원하는 팀을 위한 스킬입니다.
사용하는 경우
- ✓Gradle로 Java 앱을 GraalVM 네이티브 이미지로 빌드하고 싶을 때.
- ✓네이티브 이미지 빌드가 클래스 초기화, 링킹, 메모리 오류로 실패할 때.
- ✓Gradle 프로젝트의 네이티브 테스트를 설정하거나 누락된 reflection 메타데이터를 고쳐야 할 때.
스킬 링크
https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/assets/skills/build-native-image-gradle/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Gradle Java 앱을 GraalVM 네이티브 이미지로 빌드하도록 설정하고, 네이티브 테스트를 실행해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
빌드 파일에 GraalVM Native Build Tools 플러그인을 추가한 다음, 네이티브 컴파일, 실행, 테스트 작업을 실행합니다. JAVA_HOME으로 지정된 GraalVM JDK를 사용하며, 알려진 빌드 문제에 대한 가이드를 안내합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Gradle Native Image Build
Prerequisites
- Set
JAVA_HOMEto a GraalVM JDK installation so Gradle Native Build Tools can findnative-image. - Do not require
GRAALVM_HOMEin 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, orjavaplugin along withorg.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.
Native Testing
If nativeTest fails or you need to configure native JUnit tests or custom test suites, see 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.
Reference Files
| 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 |
자주 묻는 질문
어떤 Java 설치가 필요한가요?
JAVA_HOME으로 설정된 GraalVM JDK가 필요하며, 그래야 native-image 도구를 찾을 수 있습니다.
Maven에서도 작동하나요?
이 스킬은 Gradle을 다루며, Maven은 별도 스킬이 맡습니다.
메타데이터 누락을 도와주나요?
네. reflection과 resource 메타데이터 누락 오류를 다룹니다.
상세 정보
작성자의 원본 설명
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.
repo: oracle/graal
인기도
- GitHub 스타
- 22k
- 순위
- #10356
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
build-native-image-maven
22k에이전트가 Maven으로 Java 앱을 GraalVM 네이티브 이미지로 빌드하고 pom.xml 설정과 네이티브 테스트를 돕습니다.
building-native-image
22k에이전트가 GraalVM Native Image로 Java 프로그램을 빠른 독립 실행 앱으로 만들고, 흔한 빌드와 실행 오류를 고치도록 돕습니다.
비슷한 스킬
api-connector-builder
280k에이전트가 기존 패턴을 따라 새로운 API 연결을 만들도록 합니다. 새로운 방식을 도입하지 않고 연동을 하나 더 추가할 때 씁니다.
api-design
280k에이전트가 모범 사례에 따라 REST API를 설계하도록 돕습니다. API가 통신하는 방식, 오류를 보여 주는 방식, 데이터를 정리하는 방식을 정하는 데 유용합니다.
backend-patterns
280k에이전트가 서버 쪽 아키텍처 패턴과 데이터베이스 최적화를 다루도록 돕습니다. 서버에서 실행되는 코드를 만들거나 검토할 때 유용합니다.