{"id":15055660,"url":"https://github.com/fibrefox/javafx-gradle-plugin","last_synced_at":"2025-04-05T23:08:22.947Z","repository":{"id":47606847,"uuid":"49322254","full_name":"FibreFoX/javafx-gradle-plugin","owner":"FibreFoX","description":"Gradle plugin for JavaFX","archived":false,"fork":false,"pushed_at":"2021-08-17T06:09:15.000Z","size":582,"stargazers_count":426,"open_issues_count":32,"forks_count":60,"subscribers_count":26,"default_branch":"newyear2018release","last_synced_at":"2025-04-05T23:07:43.620Z","etag":null,"topics":["build-tool","gradle","gradle-plugin","java","javafx","javafx-gradle-plugin"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FibreFoX.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-09T11:47:41.000Z","updated_at":"2025-03-13T01:29:47.000Z","dependencies_parsed_at":"2022-09-26T22:01:23.751Z","dependency_job_id":null,"html_url":"https://github.com/FibreFoX/javafx-gradle-plugin","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FibreFoX%2Fjavafx-gradle-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FibreFoX%2Fjavafx-gradle-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FibreFoX%2Fjavafx-gradle-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FibreFoX%2Fjavafx-gradle-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FibreFoX","download_url":"https://codeload.github.com/FibreFoX/javafx-gradle-plugin/tar.gz/refs/heads/newyear2018release","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411234,"owners_count":20934653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-tool","gradle","gradle-plugin","java","javafx","javafx-gradle-plugin"],"created_at":"2024-09-24T21:45:25.709Z","updated_at":"2025-04-05T23:08:22.928Z","avatar_url":"https://github.com/FibreFoX.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/FibreFoX/javafx-gradle-plugin.svg?branch=master)](https://travis-ci.org/FibreFoX/javafx-gradle-plugin)\n[![Build status](https://ci.appveyor.com/api/projects/status/19tkbde1wrw8mc8h/branch/master?svg=true)](https://ci.appveyor.com/project/FibreFoX/javafx-gradle-plugin/branch/master)\n[![Maven Central](https://img.shields.io/maven-central/v/de.dynamicfiles.projects.gradle.plugins/javafx-gradle-plugin.svg)](https://maven-badges.herokuapp.com/maven-central/de.dynamicfiles.projects.gradle.plugins/javafx-gradle-plugin)\n\n\nJavaFX-Gradle-Plugin\n====================\n\nUsing javafx-gradle-plugin enhances your build-script with `javapackager`-power. No more using Apache Ant-calls, because this gradle-plugin wraps all calls and introduces workarounds and fixes for not-yet-fixed JDK-bugs. This gradle-plugin is a convenient-wrapper for the javapackger, so you have to [visit the official documentation](https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html#A1324980) to know about the requirements on each operating-system.\n\n**Using OpenJDK?** Please make sure you have **OpenJFX** installed too, as the required JavaFX-parts are separated.\n\n\n**Using Maven?** Not problem, just [switch to the github-project of the javafx-maven-plugin](https://github.com/javafx-maven-plugin/javafx-maven-plugin).\n\n\n\nWhy does this gradle-plugin exist?\n==================================\n\nIn the need of some equivalent of the [javafx-maven-plugin](https://github.com/javafx-maven-plugin/javafx-maven-plugin) just for gradle, this project was born. A lot of you might have used the [`javafx-gradle`-plugin from Danno Ferrin](https://bitbucket.org/shemnon/javafx-gradle/), but he decided [to not continue](https://bitbucket.org/shemnon/javafx-gradle/issues/47/adding-manifest-attribute-javafx#comment-24360784) that project.\n\n\n\nRequirements\n============\n* Gradle 2.10 and above (works on Gradle 3 too)\n* Java Developer Kit 8 with at least Update 40\n\n\n\nOS-specific requirements\n========================\n* (Windows) EXE installers: Inno Setup\n* (Windows) MSI installers: WiX (at least version 3.7)\n* (Linux) DEB installers: dpkg-deb\n* (Linux) RPM installers: rpmbuild\n* (Mac) DMG installers: hdiutil\n* (Mac) PKG installers: pkgbuild\n\n\n\nExample `build.gradle`\n======================\n\nPlease adjust your parameters accordingly:\n\n```groovy\nbuildscript {\n    dependencies {\n        classpath group: 'de.dynamicfiles.projects.gradle.plugins', name: 'javafx-gradle-plugin', version: '8.8.2'\n    }\n    \n    repositories {\n        mavenLocal()\n        mavenCentral()\n    }\n}\n\napply plugin: 'java'\n\nrepositories {\n    mavenLocal()\n    mavenCentral()\n}\n\ndependencies{\n    // this dependency is only required when using UserJvmOptionsService\n    // when using Oracle JDK\n    // compile files(\"${System.properties['java.home']}/../lib/packager.jar\")\n    // when using OpenJFX (Ubuntu), please adjust accordingly\n    // compile files(\"/usr/share/java/openjfx/lib/packager.jar\")\n}\n\napply plugin: 'javafx-gradle-plugin'\n\n// these values are the examples and defaults\n// you won't need them all\n\n// configure javafx-gradle-plugin\n// for all available settings please look at the class \"JavaFXGradlePluginExtension\"\njfx {\n    verbose = true\n    mainClass = \"com.something.cool.MainApp\"\n    jfxAppOutputDir = \"build/jfx/app\"\n    jfxMainAppJarName = \"project-jfx.jar\"\n    deployDir = \"src/main/deploy\"\n    useEnvironmentRelativeExecutables = true\n    libFolderName = \"lib\"\n    \n    // gradle jfxJar\n    css2bin = false\n    preLoader = null // String\n    updateExistingJar = false\n    allPermissions = false\n    manifestAttributes = null // Map\u003cString, String\u003e\n    addPackagerJar = true\n    copyAdditionalAppResourcesToJar = false\n    skipCopyingDependencies = false\n    useLibFolderContentForManifestClasspath = false\n    fixedManifestClasspath = null\n\n    // gradle jfxNative\n    identifier = null  // String - setting this for windows-bundlers makes it possible to generate upgradeable installers (using same GUID)\n    vendor = \"some serious business corp.\"\n    nativeOutputDir = \"build/jfx/native\"\n    bundler = \"ALL\" // set this to some specific, if your don't want all bundlers running, examples \"windows.app\", \"jnlp\", ...\n    jvmProperties = null // Map\u003cString, String\u003e\n    jvmArgs = null // List\u003cString\u003e\n    userJvmArgs = null // Map\u003cString, String\u003e\n    launcherArguments = null // List\u003cString\u003e\n    nativeReleaseVersion = \"1.0\"\n    needShortcut = false\n    needMenu = false\n    bundleArguments = [\n        // dont bundle JRE (not recommended, but increases build-size/-speed)\n        runtime: null\n    ]\n    appName = \"project\" // this is used for files below \"src/main/deploy\", e.g. \"src/main/deploy/package/windows/project.ico\"\n    additionalBundlerResources = null // path to some additional resources for the bundlers when creating application-bundle\n    additionalAppResources = null // path to some additional resources when creating application-bundle\n    secondaryLaunchers = [[appName:\"somethingDifferent\"], [appName:\"somethingDifferent2\"]]\n    fileAssociations = null // List\u003cMap\u003cString, Object\u003e\u003e\n    noBlobSigning = false // when using bundler \"jnlp\", you can choose to NOT use blob signing\n    customBundlers = null // List\u003cString\u003e\n    failOnError = false\n    onlyCustomBundlers = false\n    skipJNLP = false\n    skipNativeVersionNumberSanitizing = false // anything than numbers or dots are removed\n    additionalJarsignerParameters = null // List\u003cString\u003e\n    skipMainClassScanning = false // set to true might increase build-speed\n    \n    skipNativeLauncherWorkaround124 = false\n    skipNativeLauncherWorkaround167 = false\n    skipNativeLauncherWorkaround205 = false\n    skipJNLPRessourcePathWorkaround182 = false\n    skipSigningJarFilesJNLP185 = false\n    skipSizeRecalculationForJNLP185 = false\n    skipMacBundlerWorkaround = false\n    \n    // gradle jfxRun\n    runJavaParameter = null // String\n    runAppParameter = null // String\n\n    // per default the outcome of the gradle \"jarTask\" will be used, set this to specify otherwise (like proguard-output)\n    alternativePathToJarFile = null // String\n    \n    // to disable patching of ant-javafx.jar, set this to false\n    usePatchedJFXAntLib = true\n    \n    // making it able to support absolute paths, defaults to \"false\" for maintaining old behaviour\n    checkForAbsolutePaths = false\n    \n    // gradle jfxGenerateKeyStore\n    keyStore = \"src/main/deploy/keystore.jks\"\n    keyStoreAlias = \"myalias\"\n    keyStorePassword = \"password\"\n    keyPassword = null // will default to keyStorePassword\n    keyStoreType = \"jks\"\n    overwriteKeyStore = false\n    \n    certDomain = null // required\n    certOrgUnit = null // defaults to \"none\"\n    certOrg = null // required\n    certState = null // required\n    certCountry = null // required\n}\n```\n\n\nMinimal setup of `build.gradle`\n======================\n```groovy\nbuildscript {\n    dependencies {\n        classpath group: 'de.dynamicfiles.projects.gradle.plugins', name: 'javafx-gradle-plugin', version: '8.8.2'\n    }\n    repositories {\n        mavenLocal()\n        mavenCentral()\n\n    }\n}\napply plugin: 'java'\n\nrepositories {\n    mavenLocal()\n    mavenCentral()\n}\n\napply plugin: 'javafx-gradle-plugin'\n\n\njfx {\n    // minimal requirement for jfxJar-task\n    mainClass = 'full.qualified.nameOf.TheMainClass'\n    \n    // minimal requirement for jfxNative-task\n    vendor = 'YourName'\n}\n```\n\nCustomize Icons\n===============\n\nTo customize the icons used in a native bundle, you have to provide the icons for the appropriate bundle.\nThe icons must follow the file name convention in order to get picked up.\n\n\u003e Tip: Set the `verbose` setting to true, to log which files are picked up from your deploy directory.\n\n## macOS\nIcon location: `src/main/deploy/package/macosx`\n\nIn macOS you can provide up to three different icons.\n* .app icon\n* volume icon\n* the background of the window, when opening the dmg volume\n\nThe icon file name is depended on your `appName` setting of this plugin.\n\n| Type              | Filename                  |\n| :---------------- |:------------------------- |\n| .app icon         | \\\u003cappName\u003e.icns           |\n| volume icon       | \\\u003cappName\u003e-volume.icns    |\n| volume background | \\\u003cappName\u003e-background.png |\n\nThe icon sizes should follow the specified sizes.\nhttp://iconhandbook.co.uk/reference/chart/osx/\n\n## Linux\nIcon location: `src/main/deploy/package/linux`\n\nFor Linux you can provide one icon.\n\nThe icon file name is depended on your `appName` setting of this plugin.\n\n| Type              | Filename        |\n| :---------------- |:--------------- |\n| application icon  | \\\u003cappName\u003e.png  |\n\n\u003eWhitespaces in the `appName` will be removed in order to lookup for the icon.\nFor example a name like 'foo Bar' will lookup for a icon like 'fooBar.png'\n\n## Windows\nIcon location: `src/main/deploy/package/windows`\n\nFor Windows you can provide two different icons.\n* application icon\n* setup icon - the icon of the installer\n\n| Type              | Filename                  |\n| :---------------- |:------------------------- |\n| .exe icon         | \\\u003cappName\u003e.ico            |\n| setup exe icon    | \\\u003cappName\u003e-setup-icon.bmp |\n\n\nGradle Tasks\n============\n\n* `gradle jfxJar` - Create executable JavaFX-jar\n* `gradle jfxNative` - Create native JavaFX-bundle (will run `jfxJar` first)\n* `gradle jfxRun` - Create the JavaFX-jar and runs it like you would do using `java -jar my-project-jfx.jar`, adjustable using `runJavaParameter`/`runAppParameter`-parameter\n* `gradle jfxGenerateKeyStore` - Create a Java keystore\n* `gradle jfxListBundlers` - List all possible bundlers available on this system, use '--info' parameter for detailed information\n\n\nUsing `SNAPSHOT`-versions\n=========================\nWhen you report a bug and this got worked around, you might be able to have access to some -SNAPSHOT-version, please adjust your buildscript:\n\n```groovy\nbuildscript {\n    dependencies {\n        classpath group: 'de.dynamicfiles.projects.gradle.plugins', name: 'javafx-gradle-plugin', version: '8.8.3-SNAPSHOT'\n    }\n    repositories {\n        mavenLocal()\n        mavenCentral()\n        maven { url \"https://oss.sonatype.org/content/repositories/snapshots\" }\n\n    }\n}\n```\n\n\nExamples\n========\n\nPlease look at the [examples-folder](/examples) to see some projects in action.\n\n\nLast Release Notes\n==================\n\n**Version 8.8.2 (09-February-2017)**\n\nBugfixes:\n* fixed `launcherArguments` of secondary launchers not being set correctly (fixes issue #55)\n\n\n(Not yet) Release(d) Notes\n==========================\n\nupcoming Version 8.8.3 (???-2017)\n\n*nothing changed yet*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffibrefox%2Fjavafx-gradle-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffibrefox%2Fjavafx-gradle-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffibrefox%2Fjavafx-gradle-plugin/lists"}