On Fri, 26 Jul 2024 23:00:33 GMT, Kevin Rushforth <k...@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). > > Kevin Rushforth has updated the pull request incrementally with one > additional commit since the last revision: > > Fix bug where String was being used as if it were a Project Merged with RichTextArea/InputMap incubator branch and it builds and runs. One very minor comment. build.gradle line 970: > 968: > 969: if (HAS_JAVAFX_MODULES) { > 970: List<String> modsWithNative = [ 'javafx.graphics', > 'javafx.media', 'javafx.web' ] very minor: maybe one entry per line? ------------- Marked as reviewed by angorya (Reviewer). PR Review: https://git.openjdk.org/jfx/pull/1518#pullrequestreview-2206260222 PR Review Comment: https://git.openjdk.org/jfx/pull/1518#discussion_r1696064550