beryx / badass-runtime-plugin

Create a custom runtime image of your non-modular application
https://badass-runtime-plugin.beryx.org
Apache License 2.0
161 stars 21 forks source link

Include javac #146

Closed perNyfelt closed 1 year ago

perNyfelt commented 1 year ago

Hi,

How can I control which executables that are included in the runtime? I would like to include javac in addition to java and keytool that are currently included in the bin dir per default.

perNyfelt commented 1 year ago

in tasks.runtime.doLast i can do copy { from("${tasks.runtime.targetPlatforms['linux'].jdkHome}/bin") into("${project.buildDir}/image/${project.name}-linux/bin") include 'javac' } copy { from("${tasks.runtime.targetPlatforms['win'].jdkHome}/bin") into("${project.buildDir}/image/${project.name}/bin") include 'javac.exe' } copy { from("${tasks.runtime.targetPlatforms['mac'].jdkHome}/bin") into("${project.buildDir}/image/${project.name}/bin") include 'javac' } but it would be nice to be able to configure it in the runtime task instead :)

perNyfelt commented 1 year ago

This turned out to be a user error. By including jdk.compiler and not just java.compiler javac is correctly included.