RFR: 8333146: Move maven publication logic from build.gradle [v6]

Kevin Rushforth kcr at openjdk.org
Wed Nov 26 23:51:16 UTC 2025


On Wed, 19 Nov 2025 08:48:12 GMT, Marius Hanl <mhanl at openjdk.org> wrote:

>> Marius Hanl has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Use defineProperty and fail method from default build.gradle
>
>> So, the content of build directories differ. With this change there are 2 additional directories created under build dir: `modular-sdk` and `sdk`
>> I am not sure which is more correct behavior or if it can cause any issue. Though seems safe, as ideal way would be to do a full build and then publish. I would like to request @kevinrushforth and @johanvos to please weigh in.
> 
> Thanks a lot for testing as well!
> I saw that too and thought the same, it should be more safe and makes more sense. Before, it was depending on each individual module build task like so:
> https://github.com/openjdk/jfx/blob/f87448ec156608527d77a4204e98e08052ffecd1/build.gradle#L5850
> Which I think is much more error prone and also risks that we forget something or it is executed too early in the future.

@Maran23 I agree that the change @arapte noted above is fine, and your explanation makes sense.

I did find one other difference in artifacts created.

With the current master, running `gradle sdk` creates `build/publications` (because the sdk task indirectly depends on the tasks that create the artifacts for publication). With this patch, it doesn't. That might be an OK change.

However, I also note that with this patch, even `gradle all` doesn't create `build/publications`. Consider adding a dependency to either `gradle sdk` or, more likely, `gradle all` so that still creates `build/publications`.

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

PR Comment: https://git.openjdk.org/jfx/pull/1970#issuecomment-3583569566


More information about the openjfx-dev mailing list