File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
src/main/groovy/org/beryx/runtime/data Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -316,7 +316,7 @@ imageOutputDir:: the directory passed as argument to the `--output` option when
316
316
_usage example_: `imageOutputDir = file("$buildDir/my-packaging-image")`
317
317
318
318
imageName:: the argument passed to the `--name` option when running `jpackage` to create an application image. +
319
- _defaultValue_: `_project.name_` +
319
+ _defaultValue_: the `applicationName` configured for the `application` plugin, then `_project.name_` +
320
320
_usage example_: `imageName = "MyApp"`
321
321
322
322
imageOptions:: list of additional options to be passed to the `jpackage` executable when creating the appliction image. +
@@ -340,7 +340,7 @@ installerOutputDir:: the directory passed as argument to the `--output` option w
340
340
_usage example_: `installerOutputDir = file("$buildDir/my-packaging-installer")`
341
341
342
342
installerName:: the argument passed to the `--name` option when running `jpackage` to create an application installer. +
343
- _defaultValue_: `_project.name_` +
343
+ _defaultValue_: the `applicationName` configured for the `application` plugin, then `_project.name_` +
344
344
_usage example_: `installerName = "MyApp"`
345
345
346
346
jvmArgs:: list of JVM arguments to be passed to the virtual machine. +
Original file line number Diff line number Diff line change 16
16
package org.beryx.runtime.data
17
17
18
18
import org.beryx.runtime.util.Util
19
+ import org.gradle.api.plugins.JavaApplication
19
20
import org.gradle.api.tasks.Internal
20
21
21
22
import static org.beryx.runtime.util.Util.EXEC_EXTENSION
@@ -106,14 +107,19 @@ class JPackageData {
106
107
String getMainClassOrDefault () {
107
108
this . @mainClass ?: Util . getMainClass(project)
108
109
}
110
+
109
111
@Input
110
112
String getImageNameOrDefault () {
111
- this . @imageName ?: project. name
113
+ this . @imageName
114
+ ?: project. extensions. getByType(JavaApplication ). applicationName
115
+ ?: project. name
112
116
}
113
117
114
118
@Input
115
119
String getInstallerNameOrDefault () {
116
- this . @installerName ?: project. name
120
+ this . @installerName
121
+ ?: project. extensions. getByType(JavaApplication ). applicationName
122
+ ?: project. name
117
123
}
118
124
119
125
@OutputDirectory
You can’t perform that action at this time.
0 commit comments