Setup Guide
Please make sure your application is a working Gradle project. There shouldn’t be any compilation errors, the app should build and run.
The minimal setup doesn’t need any additional configuration. The essentials are inferred from the Java and Application plugin.
Applying the plugin
Section titled “Applying the plugin”In build.gradle.kts or build.gradle apply the plugin using the plugins DSL.
A minimal build script should contain these critical parts (adjusted according to your app):
plugins { application id("de.infolektuell.jpackage") version "x.y.z"}
application { applicationName = "SampleApp" mainClass = "org.example.App"}plugins { id application id 'de.infolektuell.jpackage' version 'x.y.z'}
application { applicationName = 'SampleApp' mainClass = 'org.example.App'}Creating an executable
Section titled “Creating an executable”To turn your app into a self-contained executable, run this task:
gradlew.bat appImage./gradlew appImageAfter running successfully, the results can be found in the build directory:
Directoryapp The project directory
Directorybuild The build directory
- …
Directoryjpackage
Directoryimage/ Contains the self-contained executable
- …
- …
- build.gradle.kts
- settings.gradle.kts
The build/jpackage/image directory contains a directory named by the application name.
This directory contains the executable and required files, it can be copied anywhere and opened.
Its structure depends on the build OS.
On macOS, the folder structure follows the mac-specific application format,, its name has an .app suffix.
It is immediately recognized as an application and can be opened like usual macOS apps.
Going further
Section titled “Going further”Now you should have a minimal working setup. The rest of this documentation describes how app customization can be achieved with this plugin.