The main purpose of this project is to test the GraalVM's native-image tool with a sample CLI Java program. The CLI program (gitignore generator) can be also used on it's own. Some functionality might be missing, but it's planned to be added in some future (see the Issues section for missing functions).
jignore
is a CLI app that can generate .gitignore contents.
jignore
is written in Java and can be compiled to the native image (thanks to GraalVM).
Example usage
jg java kotlin intellij
The above snipped will create a .gitignore
(or append to existing) with the ignore contents related to java
, kotlin
and intellij
keywords.
Note that firstly you need to compile the app to the native image (see below sections on how to do that) and later add it to the PATH
.
Shout-out to toptal.com, gitignore.io
The app uses the .gitignore collection from gitignore.io
The left Terminal shows the execution of the native image. The right one uses jar program. The difference is not huge, however still clearly visible. Note that native image does not require JVM to run.
- GraalVM Component Updater v2.0.0 (used to install
native-image
) - GraalVM native-image building tool
I've used brew to download the GraalVM
brew install --cask graalvm/tap/graalvm-ce-lts-java11
gu install native-image # Install the native-image tool that is used to generate an executable
./gradlew build-native-image
👤 Henryk Nowakowski