Skip to content

Support adding incubator modules via the Gradle plugin #178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jeffalder
Copy link

@jeffalder jeffalder commented Jun 3, 2025

Fixes #177

I don't love this approach but there are some constraints:

  1. Because the plugin is independent of the JavaFX version, I expect that JavaFX will potentially incubate other modules that become top-level modules. So the enum namespace had to incorporate potentially both incubator and non-incubator modules. Hence the _INCUBATOR name. However, this exceeds the bounds of what's known, so perhaps this is not specifically necessary.
  2. That said, keying off a name (e.g., asserting that all incubator modules have _INCUBATOR attached) is not ideal. That's why there's an explicit boolean, default false, that also indicates that it's an incubator.

Other approaches considered:

  • Not doing this at all, but as explained in Cannot use incubator modules #177, using incubator modules becomes challenging.
  • As in point 2 above, dropping the boolean and keying off the name
  • Simply hardcoding the incubator module and artifact names instead of calculating them (in fact, we should consider just doing that for all these items).
  • Switching the enums to lower-case in order to avoid a locale-sensitive operation like changing the case of I.
  • Dropping the enum entirely and building a Map<String, JavaFXModule> where the key is the module name and the record contains all the necessary data fields. I didn't think that was level of rewrite was necessarily beneficial, and it would raise the minimum Java version of the plugin from 11 to 16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot use incubator modules
1 participant