-
Notifications
You must be signed in to change notification settings - Fork 33
Uberjar
This can be used with macAppBundle 2.1.7-SNAPSHOT or later.
To use with an uberjar or other system that effects the list of jars you want to run against, for example using the Shadow plugin:
macAppBundle {
mainClassName = "gui.TestSketch"
runtimeConfigurationName = 'shadow'
jarTask = 'shadowJar'
}
The runtimeConfigurationName
parameter changes the default configuration, ie list of dependency jars, from the default Java Plugin's runtime
configuration. In the case of the Shadow plugin, they create a shadow
configuration which holds any extra jars that are needed.
The jarTask
is the task that creates the jar you wish to use. The default is the Java Plugin's jar
task. Shadow provides a shadowJar
task that creates the uberjar.
Internally both the generatePlist
and copyToResourcesJava
tasks are set to depend on the given jarTask
. The copyToResourcesJava
copies both the output of jarTask
and everything in the runtimeConfigurationName
configuration to the app bundle jarSubdir
directory, usually Contents/Java
.