Home

Awesome

PRs Welcome License Build Status

Badass JLink Plugin Example

A small application that shows how to use the Badass JLink Plugin.

The plugin is configured in build.gradle as follows:

plugins {
    id 'org.beryx.jlink' version '2.23.6'
    ...
}

jlink {
    mergedModule {
        requires 'java.naming'
        requires 'java.xml'
    }
    launcher{
        name = 'hello'
        jvmArgs = ['-Dlogback.configurationFile=./logback.xml']
    }
}

Usage

Running with gradle:

./gradlew run

The following text should appear on your screen:

LOG: Hello, modular java!

Creating and executing a custom runtime image:

./gradlew jlink
cd build/image/bin
./hello

The following text should appear on your screen:

LOG: Hello, modular java!