본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)22k · #10356

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/assets/skills/build-native-image-gradle/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Gradle Java 앱을 GraalVM 네이티브 이미지로 빌드하도록 설정하고, 네이티브 테스트를 실행해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

빌드 파일에 GraalVM Native Build Tools 플러그인을 추가한 다음, 네이티브 컴파일, 실행, 테스트 작업을 실행합니다. JAVA_HOME으로 지정된 GraalVM JDK를 사용하며, 알려진 빌드 문제에 대한 가이드를 안내합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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.

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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬