openjfx / javafx-gradle-plugin

Gradle plugin that makes it easy to work with JavaFX 11+
https://openjfx.io/
BSD 3-Clause "New" or "Revised" License
361 stars 62 forks source link

Cannot run build in Windows x86 - Version 0.0.13 #129

Open rrdiber opened 2 years ago

rrdiber commented 2 years ago

Hi, when I try to run gradle project in Windows 10 x86 I get this error:

* What went wrong:
An exception occurred applying plugin request [id: 'org.openjfx.javafxplugin', version: '0.0.13']
> Failed to apply plugin [id 'org.openjfx.javafxplugin']
   > Could not create an instance of type org.openjfx.gradle.JavaFXOptions.
      > Unsupported JavaFX platform found: 'windows-x86_32'! This plugin is designed to work on supported platforms only.Current supported platforms are 'linux-x86_64', 'linux-aarch_64', 'windows-x86_64', 'osx-x86_64', 'osx-aarch_64'.

PS. : When I use 0.0.8 plugin version it works.

rrdiber commented 2 years ago

Sorry, the gradlew version is:


------------------------------------------------------------
Gradle 6.5
------------------------------------------------------------

Build time:   2020-06-02 20:46:21 UTC
Revision:     a27f41e4ae5e8a41ab9b19f8dd6d86d7b384dad4

Kotlin:       1.3.72
Groovy:       2.5.11
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          11.0.16 (Azul Systems, Inc. 11.0.16+8-LTS)
OS:           Windows 10 10.0 x86
leomekenkamp commented 1 year ago

This one is hurting me too. It seems to me that there are more platforms for which there are libraries than what this plugin supports. And since the maven/gradle classifiers are abused to differentiate between platforms, I cannot determine which libraries are actually used by grade during the build. Which means that I cannot even manually put the correct jars in the distribution. So I really depend on this plugin. Please make it support all available platforms.

leomekenkamp commented 1 year ago

See also this post on stack overflow.

https://stackoverflow.com/questions/75006480/javafx-maven-platform-specific-build-mac-aarm64-qualifier

There are a lot of options that this plugin does not support yet.

leomekenkamp commented 1 year ago

The fix is trivial. Adding the next line to the JavaFXPlatform enum fixes this for JavaFX versions 17 and higher:

WIN_x86_32("win-x86", "windows-x86_32"),

I made a copy of the plugin and put in the buildSrc dir of my own project. Needed to delete some stuff from the Gradle build file to get it working. But now it works with Windows on an Intel chip in 32 bits mode.