jlink-gradle-plugin
JLink Gradle Plugin
Gradle plugin for jlink.
Finding jlink
Plugin searches for executable using the following priority list:
-
Configured toolchain
-
system property.java.home
Though rarely required it is possible to override toolchain for particular task:
Configuration
Parameters
| Parameter | Type | jlink argument |
|---|---|---|
| addModules | ListProperty<String> | --add-modules |
| bindServices | Property<Boolean> | --bind-services |
| endian | Property<Endian> | --endian |
| generateCdsArchive | Property<Boolean> | --generate-cds-archive |
| ignoreSigningInformation | Property<Boolean> | --ignore-signing-information |
| includeLocales | ListProperty<String> | --include-locales |
| limitModules | ListProperty<String> | --limit-modules |
| modulePaths | ConfigurableFileCollection | --module-path |
| noHeaderFiles | Property<Boolean> | --no-header-files |
| noManPages | Property<Boolean> | --no-man-pages |
| output | DirectoryProperty | --output |
| stripDebug | Property<Boolean> | --strip-debug |
| verbose | Property<Boolean> | --verbose |
Endian
| Plugin Value | jlink Value |
|---|---|
| LITTLE | little |
| BIG | big |
Output Directory
utility fails if output directory already exists. At the same time gradle always creates plugin output
directory.
In order to work around this behaviour plugin always tries to delete directory specified by before
launching .
For safety reasons must point to the location inside .
Logging
Plugin uses to print various information about toolchain, parameters, etc. Use gradle
option to check this output.
Dry Run Mode
To execute plugin tasks in dry run mode without calling set property to true.
Example:
Configuration Cache
This plugin should be compatible with Gradle configuration cache.