FibreFoX / javafx-gradle-plugin

Gradle plugin for JavaFX
Apache License 2.0
427 stars 59 forks source link

Smart way to make multiple builds ? #127

Closed nebularnoise closed 6 years ago

nebularnoise commented 6 years ago

Hi ! First of all, I love this plugin, it's making my life easier, so thanks a lot!

I'm trying to build two versions of my project's "jfxNative" at once: one with runtime, one without a runtime.

So, I've successfully done each and every one of them separately, by adding or commenting the following in my build.gradle:

jfx{
    //...
    //bundleArguments = [runtime: null]
}

But somehow, passing a property as argument of gradle doesn't work. The following build a native app with a runtime:

$ gradle -P jfx.bundleArguments= [runtime: ]

I'm probably doing it wrong, but gradle doesn't throw an error, and after a fair amount of research, I can't figure it out.

nebularnoise commented 6 years ago

Nervermind, I ended up using my own prop:

// gradle.properties
noRuntime = false;
// gradle.build
jfx{
    //...
    if(noRuntime.toBoolean()){
        bundleArguments = [runtime: null]
    }
}
$ gradle jfxNative
$ gradle jfxNative -P noRuntime=true