Wednesday, 10 November 2021

Gradle build for 2 platforms: JavaFX and Android. How to?

I have an app that works on 2 platforms: Android and JavaFX.

Basically, my sources look like this:

java
   |
   |---android //android specific sources
   | 
   |---common  //plain java common sources
   |
   |---fx      //JavaFX specific sources

For the moment I'm using 2 different build files one of them build.android.gradle and the other build.fx.gradle and instantly renaming them to build.gradle depending on the situation. I mean it is an odd and real nightmare.

My intention is to have either 2 different build.gradle files (placed in different folders?) or a single build.gradle which builds APK for Android and JAR for JavaFX

The question is: how to achieve this?



from Gradle build for 2 platforms: JavaFX and Android. How to?

No comments:

Post a Comment