Using JavaFX 2 Ant tasks with Gradle

Hello,

Hello, I’m trying to use the JavaFX task (see http://docs.oracle.com/javafx/2/deployment/packaging.htm) signjar from Gradle, with something like this:

task fxdeploy(dependsOn: 'jar') {
    ant.taskdef(resource: 'com/sun/javafx/tools/ant/antlib.xml', uri: 'javafx:com.sun.javafx.tools.ant') {
        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 http://docs.oracle.com/javafx/2/deployment/javafx_ant_task_reference.htm#CIAFCHDI), but how can I proceed in Gradle?

Cheers,

Bertrand.