I am writing a program that I would like to deploy both desktop and android applications. I want to use JavaFX 2.0 with FXML for desktop computers. I want to work fully in Android Studio. Right now, I'm just worried about creating an executable on the desktop (for Windows, for starters) for my JavaFX program. I would like to create a file .exe, if possible, or at least .jar.
To clarify, I am not asking how to start deploying / compiling an existing JavaFX project for Android. I know there is something called JavaFXPorts for this. I just want to compile and deploy a regular JavaFX program using Android Studio, completely ignoring anything that needs to be done with Android. (If JavaFXPorts somehow helps with this, then by all means, please show me how).
So far, I have managed to create a regular Java application in the Android studio, add the 'hello world' JavaFX files and (sort of) deploy the program .
There are many questions condensed into this one question. I do not know where to place my FXML files so that my last Jar file can find them. I think I need to get gradle to copy them to the assembly directory, but I don't know what the standard way to do this is. Do I need to add FXML files to the "resources" or "assets" directory? How to write a gradle script file to copy files? Should I access FXML files directly or through a resource system?
It seems that IntelliJ does this automatically using the compiler resource options , but Android Studio lacks this feature (probably because it is assumed that I only want to create an Android application, so I need to use the Android resource system).
, Java Android Studio.
, : https://github.com/Aralox/Android-Studio-FXML-Executable-JavaFX-Project
:
/. , JavaFX gradle script, . ( ).

FXML, - ( FXML, getClass().getResource() , FXML ),

, , FXML ( , ).

, , , . "" - , . !