@@ -14,16 +14,15 @@ and publish the platform binaries using GitHub action.
1414# Install GraalVM CE Dev
1515$ ./scripts/graalvm-ce-dev.sh
1616
17- # Install GraalVM CE
18- $ curl -s " https://get.sdkman.io" | bash
19- $ sdk i java 25.0.1-graalce
17+ # or Install GraalVM CE
18+ $ sdk i java 25-graalce
2019```
2120
2221### Build
2322
2423``` bash
2524# Build the native image
26- $ ./gradlew nativeCompile
25+ $ ./gradlew nativeCompile [-Pquick]
2726
2827# Use trace agent for metadata generation
2928$ ./gradlew -Pagent run [--rerun-tasks]
@@ -35,17 +34,6 @@ $ ./gradlew metadataCopy
3534$ ./gradlew nativeTest
3635$ ./gradlew -Pagent nativeTest
3736
38- # Native Image Quick Build
39- $ ./gradlew nativeCompile -Pquick
40-
41- # Build Native Image Bundles
42- $ ./gradlew nativeCompile -Pbundle
43- $ native-image --bundle-apply=" build/native/nativeCompile/native-image-playground.nib"
44- $ build/native-image-playground.output/default/native-image-playground
45-
46- # Build by disabling the build cache
47- $ ./gradlew clean nativeCompile --rerun-tasks --no-build-cache
48-
4937# GraalVM JIT Mode
5038$ ./gradlew build
5139$ java --enable-preview \
@@ -104,16 +92,18 @@ $ native-image \
10492
10593 ``` bash
10694 $ build/native/nativeCompile/native-image-playground -XX:PrintFlags= 2>&1
107-
108- # Eg: Set HeapDump path
95+ # Set HeapDump path
10996 $ build/native/nativeCompile/native-image-playground -XX:HeapDumpPath=$HOME /heapdump.hprof
11097 ```
11198
11299- Object/Shared Lib Details
113100
114101 ``` bash
115- # Show shared libs
102+ # Show shared libs (MacOS)
116103 $ otool -L build/native/nativeCompile/native-image-playground
104+ # Show shared libs (Linux)
105+ $ ldd build/native/nativeCompile/native-image-playground
106+ $ objdump -p build/native/nativeCompile/native-image-playground | grep NEEDED
117107
118108 # SVM details
119109 $ strings -a build/native/nativeCompile/native-image-playground | grep -i com.oracle.svm.core.VM
@@ -124,17 +114,6 @@ $ native-image \
124114
125115- [ Mach-O Format Viewer] ( https://github.com/horsicq/XMachOViewer )
126116
127-
128- - Misc Gradle Tasks
129-
130- ``` bash
131- # Detect unused and misused dependencies
132- $ ./gradlew buildHealth
133- $ cat build/reports/dependency-analysis/build-health-report.txt
134-
135- $ ./gradlew reason --id org.jetbrains.kotlin:kotlin-stdlib
136- ```
137-
138117### Resources
139118
140119* [ GraalVM Native Image] ( https://www.graalvm.org/reference-manual/native-image/ )
0 commit comments