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

In general, these changes look ok (and are indeed fixing an issue).
I keep hoping that changes to build.gradle lead to a smaller file, but the 
monolith is only getting bigger (more lines). It would be great if more logic 
can be split into a separate file, which would make the huge build.gradle a bit 
more maintainable, but I understand this is not trivial.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1518#issuecomment-2258256953

Reply via email to