On Tue, 10 Nov 2026 13:01:20 GMT, Marius Hanl <[email protected]> wrote:

>> * Updated the `java` plugin to the `java-library` plugin, which allows 
>> automatic library configurations. It has no effect in this PR, but is a 
>> necessary step for correct dependency wiring.
>> * Moved (as-is) the block that defines module paths above the `allprojects` 
>> configuration to make the paths available for later code.
>> * Unified the `ext` properties, module source paths, and verification checks 
>> configurations for modular projects in `allprojects` (from their repeating 
>> individual blocks).
>> * Removed redundant source sets: the `java` plugin already defines the 
>> [`main` and `test` source 
>> sets](https://docs.gradle.org/current/userguide/java_plugin.html#source_sets)
>>  and makes the project dependent on them. The `shims` are already configured 
>> separately in the other `allprojects` with 
>> `project.sourceSets.shims.java.srcDirs += 
>> project.sourceSets.main.java.srcDirs` etc. (which is also not the right way 
>> of doing it), so their current definition is redundant.
>> 
>> I've tested with `win.gradle`'s `WIN.compileSwing = false` and with 
>> `WIN.compileSWT = false` in addition to the standard `sdk` and `test` in 
>> various scenarios.
>> 
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> build.gradle line 2108:
> 
>> 2106:     }
>> 2107: 
>> 2108:     project.ext.buildModule = true
> 
> This makes every project a module. Including `systemTests` and `swt`, for a 
> short time (will be reset below). Does this makes sense, also thinking about 
> the future?

There are several flags that handle a project's status, some of which are 
conflicting or redundant. I suspect that this is the result of the transition 
period into the module system of JavaFX while at the same time Gradle didn't 
support it (and its support improved over time). This left various "relics" of 
manual configuration, which I intend to tackle next. For example, what is the 
`moduleRuntime` property doing for us?
The correct design is where Gradle figures out which projects are modules and 
then does the wiring based on that instead of our manual configuration. For 
now, configuring a default and then overriding per-project is still a correct 
simplification.

Also, I don't know why swing and swt were kept not modular.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2305#discussion_r4525881279

Reply via email to