Integrated: 8337281: build.gradle assumes all modules are named "javafx.$project"
Kevin Rushforth
kcr at openjdk.org
Fri Aug 2 20:15:39 UTC 2024
On Fri, 26 Jul 2024 17:04:17 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
> This PR fixes a bad assumption in a few places in `build.gradle`, which assumes that the module name can be derived from the name of the gradle project name by prepending `"javafx."` to the name rather than using the `moduleName` property of the project. In many of these places, the logic replaces dots with dashes in the name, but it does so by prefixing the project name with `"javafx-"` rather than doing a string replacement. This means that a module with more than one dot will only have the first one replaced.
>
> I discovered this while working on the following two RFEs, both of which hit this bug:
>
> [JDK-8309381](https://bugs.openjdk.org/browse/JDK-8309381): Support JavaFX incubator modules
> [JDK-8337280](https://bugs.openjdk.org/browse/JDK-8337280): Include jdk.jsobject module with JavaFX
>
> Both of them need this bug to be fixed, so I am separating it out into its own issue.
>
> ### Notes to reviewers
>
> Most of the problematic logic is in the maven publication method, which is only enabled via `gradle -PMAVEN_PUBLISH=true` (in the absence of any other params, that won't actually try to publish anything, so is safe to use for testing). I left in some print statements for the purpose of testing, that I will remove with the next commit.
>
> I tested this with the following branch, which is a preliminary prototype of adding jdk.jsobject to the build with the fix from _this_ PR applied: [test-module-name-jsobject](https://github.com/kevinrushforth/jfx/tree/test-module-name-jsobject).
This pull request has now been integrated.
Changeset: 0fa50cbb
Author: Kevin Rushforth <kcr at openjdk.org>
URL: https://git.openjdk.org/jfx/commit/0fa50cbbd9878ca7ec0e1bfcc5567bf52e3b8db2
Stats: 19 lines in 1 file changed: 13 ins; 0 del; 6 mod
8337281: build.gradle assumes all modules are named "javafx.$project"
Reviewed-by: angorya, arapte
-------------
PR: https://git.openjdk.org/jfx/pull/1518
More information about the openjfx-dev
mailing list