Search code examples
androidjavafxgradleandroid-gradle-pluginbuilding

How do you use the gradle javafx android builder?


For the gradle javafx builder I've used the tutorial at: https://bitbucket.org/javafxports/android/wiki/Building%20and%20deploying%20JavaFX%20Applications
I downloaded the runtime from here: https://bitbucket.org/javafxports/android/downloads I'm using javafx in eclipse. I have tried to build the project with theses parameters:

    gradle -PDEBUG -PDIR=C:/Users/spencer/Desktop -PNAME=HelloAndroidWorld -PPACKAGE=com.helloworld -PJFX_SDK=C:/Users/spencer/Downloads/dalvik-sdk-latest/dalvik-sdk/android-tools -PJFX_APP=C:/Users/spencer/Documents/Eclipse/Work" "Space/Interactive" "JavaFX/src -PJFX_MAIN=application.Main.java

Here is the message I got afterwards:

    C:\Users\spencer>gradle -PDEBUG -PDIR=C:/Users/spencer/Desktop -PNAME=HelloAndro
idWorld -PPACKAGE=com.helloworld -PJFX_SDK=C:/Users/spencer/Downloads/dalvik-sdk
-latest/dalvik-sdk/android-tools -PJFX_APP=C:/Users/spencer/Documents/Eclipse/Wo
rk" "Space/Interactive" "JavaFX/src -PJFX_MAIN=application.Main.java
:help

    Welcome to Gradle 1.12.

    To run a build, run gradle <task> ...

    To see a list of available tasks, run gradle tasks

    To see a list of command-line options, run gradle --help

    BUILD SUCCESSFUL

    Total time: 9.871 secs

I cannot find the file on my desktop! When i try adding "createProject" to the end i give me errors.

How do i build a android project?

I am not sure what id did wrong this is my first time trying this please help. All the help so far has been great!
Thanks


Solution

  • you have to give task to a gradle for creating a project give createProject task at the end of all parameters but before that you have to run gradle from your dalvik sdk into the android-tools folder because it contain the build.gradle file in which createProject task is defined for example
    into the command line:

    c:\User\dalvik\dalvik-sdk\android-tools> gradle -PDEBUG -PDIR=C:/Users/spencer/Desktop -PNAME=HelloAndroidWorld -PPACKAGE=com.helloworld -PJFX_SDK=C:/Users/spencer/Downloads/dalvik-sdk-latest/dalvik-sdk/android-tools -PJFX_APP=C:/Users/spencer/Documents/Eclipse/Work" "Space/Interactive" "JavaFX/src -PJFX_MAIN=application.Main.java createProject