I'm trying to build a relatively simple JavaFX application using Gradle. However, I have no idea how to do it.
I'm relatively new to Gradle, and for simple (non-JavaFX) projects I've successfully used the plugins java
and application
to build and package libraries and command-line applications.
However, I'm completely stuck when it comes to JavaFX. I've read this article, which suggests using the JavaFX
plugin, however I could only find the source code for this plugin, but no documentation on how to actually obtain it and use it (in the article they simply apply it from a remote URL, but that fails on my machine, saying I'm not authorized...)
Any clues on how to do this properly?
Here's an example Gradle JavaFX build on GitHub. Note that according to Bintray, the latest version of the plugin is 8.1.1, so replace the '0.3.0' in the plugin URL with '8.1.1' if you want the latest.
Just to be clear, this is a very unusual way to distribute a Gradle plugin. Most are much easier to incorporate in a build!
Edit: up-to-date fork that works using "apply plugin" https://github.com/FibreFoX/javafx-gradle-plugin