Skip to content

Commit

Permalink
Merge branch 'natsufumij-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
siordache committed Mar 3, 2022
2 parents be15016 + 6e7cdc6 commit 9370e3c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/groovy/org/beryx/jlink/data/JPackageData.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class JPackageData {
@Input @Optional
String appVersion

String vendor

@Input @Optional
String icon

Expand Down Expand Up @@ -96,6 +98,11 @@ class JPackageData {
launcherData.name
}

@Input
String getVendor(){
this.@vendor ?: 'Unknown';
}

@Input
List<SecondaryLauncherData> getSecondaryLaunchers() {
this.@secondaryLaunchers
Expand Down
4 changes: 4 additions & 0 deletions src/main/groovy/org/beryx/jlink/impl/JPackageTaskImpl.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ class JPackageTaskImpl extends BaseTaskImpl<JPackageTaskData> {
throw new GradleException("The first character of the --app-version argument should be a digit.")
}

def vendor = jpd.getVendor()
def vendorOpts = ['--vendor',vendor]

final def resourceDir = jpd.resourceDir
final def resourceOpts = (resourceDir == null) ? [] : [ '--resource-dir', resourceDir ]

Expand All @@ -91,6 +94,7 @@ class JPackageTaskImpl extends BaseTaskImpl<JPackageTaskData> {
'--dest', jpd.installerOutputDir,
'--name', jpd.installerName,
*versionOpts,
*vendorOpts,
'--app-image', "$appImagePath",
*resourceOpts,
*jpd.installerOptions]
Expand Down

0 comments on commit 9370e3c

Please sign in to comment.