• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

petr-panteleyev/jpackage-gradle-plugin: JPackage Gradle Plugin

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

petr-panteleyev/jpackage-gradle-plugin

开源软件地址(OpenSource Url):

https://github.com/petr-panteleyev/jpackage-gradle-plugin

开源编程语言(OpenSource Language):

Java 95.8%

开源软件介绍(OpenSource Introduction):

JPackage Gradle Plugin

Gradle plugin for jpackage tool available since JDK-14.

Gradle Plugin Portal Gradle Java BSD-2 license

Finding jpackage

Plugin searches for jpackage executable using the following priority list:

  1. Configured toolchain

  2. java.home system property.

Configuration

There are generic jpackage parameters as well as OS-specific parameters for OS X, Linux, Windows. OS-specific parameters are processed when build is done on the corresponding OS.

If some generic parameters should have different values based on OS then they should be placed into configuration blocks:

  • windows
  • mac
  • linux

Example:

// Windows specific parameters will be processed only during Windows build
winMenu = true
winDirChooser = true

mac {
    // Generic parameter value for OS X build
    icon = "icons/icons.icns"
}

windows {
    // Generic parameter value for Windows build
    icon = "icons/icons.ico"
}

Parameters

ParameterTypeJPackage Argument
Generic
typeImageType--type <type>
appNameString--name <name>
appVersionString--app-version <version>
copyrightString--copyright <copyright string>
appDescriptionString--description <description string>
vendorString--vendor <vendor string>
installDirString--install-dir <file path>
moduleString--module <module name>[/<main class>]
mainClassString--main-class <class name>
mainJarString--main-jar <main jar file>
verboseBoolean--verbose
argumentsString--arguments <main class arguments>
addModulesString--add-modules <module>[,<module>]
appImageString (*)--app-image <name>
destinationString (*)--dest <destination path>
fileAssociationsString (*)--file-associations <file association property file>
iconString (*)--icon <icon file path>
inputString (*)--input <input path>
licenseFileString (*)--license-file <license file path>
modulePathsString (*)--module-path <module path>
resourceDirString (*)--resource-dir <resource dir path>
runtimeImageString (*)--runtime-image <file path>
tempString (*)--temp <temp dir path>
launchersLauncher (*)--add-launcher <name>=<property file>
Windows
winMenuBoolean--win-menu
winDirChooserBoolean--win-dir-chooser
winUpgradeUuidString--win-upgrade-uuid <id string>
winMenuGroupString--win-menu-group <menu group name>
winShortcutBoolean--win-shortcut
winPerUserInstallBoolean--win-per-user-install
winConsoleBoolean--win-console
OS X
macPackageIdentifierString--mac-package-identifier <ID string>
macPackageNameString--mac-package-name <name string>
macPackageSigningPrefixString--mac-package-signing-prefix <prefix string>
macSignBoolean--mac-sign
macSigningKeychainString (*)--mac-signing-keychain <file path>
macSigningKeyUserNameString--mac-signing-key-user-name <team name>
Linux
linuxPackageNameString--linux-package-name <package name>
linuxDebMaintainerString--linux-deb-maintainer <email address>
linuxMenuGroupString--linux-menu-group <menu-group-name>
linuxRpmLicenseTypeString--linux-rpm-license-type <type string>
linuxAppReleaseString--linux-app-release <release value>
linuxAppCategoryString--linux-app-category <category value>
linuxShortcutBoolean--linux-shortcut

(*) - these parameters represent file or directory path and are resolved relative to the project root unless they contain an absolute path.

Image Type

Plugin Value JPackage Type
DEFAULT Default image type, OS specific
APP_IMAGE app-image
DMG dmg
PKG pkg
EXE exe
MSI msi
RPM rpm
DEB deb

Default Command-Line Arguments

Default command line arguments are passed to the main class when the application is started without providing arguments. Each argument should be specified using <argument> configuration parameter.

Example:

argumens = listOf(
    "SomeArgument",
    "Argument with spaces",
    "Argument with \"quotes\""
)

Additional Parameters

Additional parameters allow passing jpackage command line options not supported by the plugin. These parameters are passed as is without any transformation.

Example:

additionalParameters = listOf(
    "--jlink-options",
    "--bind-services"
)

Logging

Plugin uses LogLevel.INFO to print various information about toolchain, jpackage parameters, etc. Use gradle option --info to check this output.

Dry Run Mode

To execute plugin tasks in dry run mode without calling jpackage set propertyjpackage.dryRun to true.

Example:

$ ./gradlew clean build jpackage --info -Djpackage.dryRun=true

Examples

References

Packaging Tool User's Guide




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap