feat: add Gradle build with GraalVM Native Image support - #2
Open
Ryan-Miao wants to merge 1 commit into
Open
Conversation
Add Gradle build configuration as an alternative to Maven, with GraalVM native image compilation support for dramatically improved startup performance. Key changes: - build.gradle with Spring Boot 4.1.0-M2 + GraalVM plugin 0.10.6 - Gradle wrapper 9.0.0 with Tencent mirror for China users - JLine JNI provider for GraalVM compatibility (FFM as runtime fallback) - .gitignore updated for Gradle build artifacts Performance benchmark results (Ubuntu, JDK 25.0.2): - Startup: 2500ms (JAR) → 107ms (native) = 23x faster - Memory: 276MB (JAR) → 96MB (native) = 65% reduction Usage: ./gradlew bootJar # Build JAR ./gradlew nativeCompile # Build native image ./gradlew nativeCompile -PquickBuild # Quick dev build (less optimized) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Performance Benchmark (Ubuntu, JDK 25.0.2)
Usage
Files Added/Modified
build.gradle— Gradle build config with Spring Boot + GraalVM pluginsettings.gradle— Project namegradlew/gradlew.bat— Gradle wrapper scriptsgradle/wrapper/— Wrapper jar + properties (Tencent mirror).gitignore— Added Gradle build artifactsNotes
sdk install java 25.0.2-graal)Test plan
./gradlew bootJar— JAR builds and runs successfully./gradlew nativeCompile— Native image compiles and runs🤖 Generated with Claude Code