Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/namuan/kt-cli-app
Sample Kotlin command line application generating native image using GraalVM
https://github.com/namuan/kt-cli-app
graalvm-native-image kotlin native-image-maven-plugin
Last synced: 3 months ago
JSON representation
Sample Kotlin command line application generating native image using GraalVM
- Host: GitHub
- URL: https://github.com/namuan/kt-cli-app
- Owner: namuan
- License: mit
- Created: 2022-12-30T11:39:09.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-01T06:58:22.000Z (about 1 year ago)
- Last Synced: 2024-10-17T08:13:45.056Z (3 months ago)
- Topics: graalvm-native-image, kotlin, native-image-maven-plugin
- Language: Kotlin
- Homepage:
- Size: 89.8 KB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kotlin Command Line Application
This is a sample Kotlin command line application.
## Install this application
### MacOS X
```shell
brew install namuan/tap/kt-cli-app
```## Setup
Install SDKMAN! (https://sdkman.io/install)
Download GraalVM
```shell
sdk install java 22.3.r19-grl
```Install native-image builder
```shell
sdk use java 22.3.r19-grl
gu install native-image
```Set environment variable for GraalVM.
Make sure you have it correctly setup if you get the following error```text
--------------------------------------------------------
'gu' tool wasn't found. This probably means that JDK at isn't a GraalVM distribution.
``````shell
export JAVA_HOME=`sdk home java 22.3.r19-grl`
```Alternatively, use the following command from the project directory
```shell
sdk env
```## Build
```shell
make build
```## Run
```shell
make run
```## Credits
Based on the previous work by [grodzickir](https://github.com/grodzickir/kotlin-jvm-cli-native-tool-template)