gluonhq / scenebuilder

Scene Builder is a visual, drag 'n' drop, layout tool for designing JavaFX application user interfaces.
https://gluonhq.com/products/scene-builder/
Other
748 stars 220 forks source link

Move build system to Maven #337

Closed johanvos closed 3 years ago

johanvos commented 3 years ago

We want to create new builds of Scene Builder for every major release of the JavaFX SDK and the Java SDK. That means today, we want to build with and bundle with Java 16. However, this is not yet supported by Gradle (see https://github.com/gradle/gradle/issues/13481) . Instead of going through issues with every release, we should use maven to build Scene Builder.

palexdev commented 3 years ago

This was a bad idea Building with Gradle is much easier than using Maven With Gradle you could simply use the badass-jlink plugin instead of using scripts, which on my system fail to execute

Plus:

However, this is not yet supported by Gradle (see gradle/gradle#13481) . Instead of going through issues with every release, we should use maven to build Scene Builder. The Gradle team released the 7.0 and 7.1 versions really fast, you could have waited a little longer before this bad decision

abhinayagarwal commented 3 years ago

Hi @palexdev ,

Gradle needs to be patched for every JDK version. For example, Gradle currently doesn't support JDK 17.

We plan to release Scene Builder for every major JDK release and this keeps coming up as a hindrance.

What exactly is failing for you?

johanvos commented 3 years ago

I don't want to start yet another gradle versus maven war here. There are plenty of resources online discussing the issues with Gradle -> Groovy -> ASM which needs to be updated for every major release, and I don't want to repeat this here.

We lost way too much time already with gradle issues, which would have better been spent fixing SceneBuilder issues.

That is not to say Maven is better than Gradle, but for this project and with our skills, maintaining a pom file is easier for us than maintaining gradle scripts. For other projects, it might be the reverse, so we're just being pragmatic here.

palexdev commented 3 years ago

@abhinayagarwal Like I said, Gradle releases new versions pretty fast, waiting one/two weeks longer to release a new SceneBuilder version is not a big deal. But you are right, with every new Gradle version there's a high chance that the build configurations need to be patched.

375, I don't know, Maven throws some output, but it's a mess, another reason why I don't like it

@johanvos You're right, no war, let's just say that each has its pros and cons. However, with Maven you had to introduce jpackage build scripts to build the msi package. Using cmd and sh scripts is never a good idea. These complex tasks should be managed by the build system and leave it configure the paths and options. On my system (Windows 11) the jpackage.bat script fails for several reasons. 1) The JAVA_HOME is in the C:\Program Files folder, so the environmental variable needs to be wrapped in quotation marks like this "%JAVA_HOME%" because there's a space in the path 2) The JDEPS_MODULES is not set correctly, if I echo it I get C:\Programs, same issue as before, and even if correct it I get errors about "--print-module-deps" and "--ignore-missing-deps" options not beign recognized

I just wanted to build the msi myself to test the logging system that has been recently fixed. I wanted to do some debugging with it, but I can't even compile the project