मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)22k · #10356

build-native-image-gradle

यह क्या करती है

यह स्किल Java डेवलपर को उनके Gradle प्रोजेक्ट को जल्दी शुरू होने वाले native प्रोग्राम में बदलने में मदद करती है। यह उन टीमों के लिए है जो हल्के और तेज़ Java ऐप्स चाहती हैं।

कब इस्तेमाल करें

  • ✓जब आप Gradle से Java ऐप को GraalVM native image के रूप में बनाना चाहते हों।
  • ✓जब native image build class initialization, linking या memory त्रुटियों से फ़ेल हो जाए।
  • ✓जब आपको Gradle प्रोजेक्ट के लिए native tests सेट करने हों या reflection metadata ठीक करना हो।

Skill का लिंक

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 में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/assets/skills/build-native-image-gradle/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे Gradle Java ऐप को GraalVM native image के रूप में बनाने के लिए सेट कीजिए और native tests चलाइए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह आपकी build फ़ाइल में GraalVM Native Build Tools plugin जोड़ती है, फिर native compile, run और test कार्य चलाती है। यह JAVA_HOME पर सेट GraalVM JDK इस्तेमाल करती है, और जानी-पहचानी build समस्याओं के लिए गाइड की ओर इशारा करती है।

तकनीकी सामग्री (मूल 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 इंस्टॉल चाहिए?

GraalVM JDK, जिसे JAVA_HOME पर सेट किया गया हो, ताकि native-image टूल मिल सके।

क्या यह Maven के साथ भी काम करती है?

Gradle इस स्किल से कवर होता है, और Maven की अपनी अलग स्किल है।

क्या यह metadata की कमी में मदद करती है?

हाँ। यह reflection और resource metadata की त्रुटियाँ कवर करती है।

जानकारी

लेखक का मूल विवरण

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
लाइसेंस
—
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills