Using JavaFX 2 Ant tasks with Gradle


Hello, I’m trying to use the JavaFX task (see signjar from Gradle, with something like this:

task fxdeploy(dependsOn: 'jar') {
    ant.taskdef(resource: 'com/sun/javafx/tools/ant/antlib.xml', uri: '') {
        classpath {
            pathelement(location: "${javafxHome}/lib/ant-javafx.jar")

The taskdef call works, but I don’t know how to call the JavaFX’s signjar instead of the Ant’s default signjar. In the JavaFX documentation this task is used with the fx namespace (<fx:signjar …>) declared in the project element of a normal build Ant file (see, but how can I proceed in Gradle?