I just spun and released the 0.1.0 version of my JavaFX Gradle plugin. There is only one new feature: ScenicView integration. The rest is behind the scenes work where I am moving away from the Ant tasks. I also updated some of the web scripts to launch it.
As mentioned in a previous post the plugin now integrates the Scenic View libraries. This is the easiest way I know of to launch it on a Mac, since the auto-connect still seems to be a bit wonky.
Escaping the Legacy of Ant
Ant was awesome. Especially in the Twentieth Century when it was first written. And for a good number of years after Y2K failed to end the world. It gave us a Rosetta Stone by which all build systems could access an invoke a given task. The problem is that it is usually just a proxy for more powerful features just under the surface. Since Oracle has been living up to their commitment of releasing more of JavaFX as open source I can now look and see exactly how the JavaFX packager Ant tasks are working.
The first step is to replicate what was functioning through the 0.0.0 release directly without going through the Ant tasks. The next task, for the 0.2.0 releases, is to expose more of the knobs and switches that the Ant tasks didn’t expose. Just the ones that make sense however. Then after that I will look at adding more value-adds on top of the packager, like automatic icon generation. This also opens the realm of writing other bundling options, even outside the realm of JavaFX such as XMLVM and other shiny technologies. But I digress.
Versioned Launch Scripts
To support using the classes directly in the build file I added a couple of dependencies into the plugin script. Hence I have added versioning information into the URLs of the launch scripts so these dependencies don’t bleed into unneeded versions. If you want the latest and greatest all the time continue to use the version free URL:
apply from: 'https://repository-javafx-gradle-plugin.forge.cloudbees.com/release/javafx.plugin'
The danger here is that I may change something that breaks your builds. To lock into a particular version of the plugin, you can add the version just after release or snapshot:
apply from: 'https://repository-javafx-gradle-plugin.forge.cloudbees.com/release/0.1.0/javafx.plugin'
Note that if you are using a snapshot URL you need the
-SNAPSHOT in the url as well
apply from: 'https://repository-javafx-gradle-plugin.forge.cloudbees.com/snapshot/0.2.0-SNAPSHOT/javafx.plugin'
Of course you can always do a copy and paste of the content of these scripts. This is useful for network disconnected builds.
I intend to call whatever is out and running when Java 8 ships the “1.0” version. At that time I will no longer make it a point to have it work on Java 7 versions of JavaFX. There is so much new and awesome stuff coming in version 8 that it will be hard to not use it. Until then expect sporadic and unpredictable updates as my schedule allows.
As previously stated for the 0.2.0 release I intend to expose more of the packager interfaces that make sense. I also intend to make the plugin more Gradle “idiomatic” with the help of @MrHaki’s Gradle Effective Implementation Guide. Apparently I am doing the JavaFX convention wrong in the code and I should be using ExtensionContainer or something to that effect. I’ll let you know more after I read up on it.
I also like feedback, that is why I turned on the bug tracker that BitBucket provides. While I cannot commit to fix every bug immediately I will look at all patches and pull requests with a bias towards committing them.