Skip to content

Conversation

@Maran23
Copy link
Member

@Maran23 Maran23 commented Nov 11, 2025

This PR splits the maven publishing logic into an own file, maven-publish.gradle, that is next to the root build.gradle.

The build.gradle will apply the maven-publish.gradle. The maven-publish.gradle will then configure the Maven related properties and provides addMavenPublication as Closure.

This way, the logic and code can be completely the same. All modules still call addMavenPublication, as before.

jfx/build.gradle

Lines 2894 to 2898 in 013e55b

addMavenPublication(project, [ 'base' ])
addValidateSourceSets(project, sourceSets)
}

But the publishing code and properties itself are out of the main build.gradle.

Tested with:

  • ./gradlew -PMAVEN_PUBLISH=true -PMAVEN_VERSION=custom publishToMavenLocal
  • ./gradlew -PMAVEN_PUBLISH=true publishToMavenLocal
  • ./gradlew -PMAVEN_PUBLISH=true -PMILESTONE_FCS=true publishToMavenLocal

Everything still works:
-> javafx.base from the local .m2 repository
image

I think this is a good step and an easy way to split out functionality without blowing things up. We might want to do that for other parts as well.

Note: I also fixed the deprecated buildDir and 2 warnings where it seems like he might not be able to infer the type (changing def to the actual type).
-> The file is completely green, no warnings or deprecations.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 2 Reviewers)

Issue

  • JDK-8333146: Move maven publication logic from build.gradle (Enhancement - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1970/head:pull/1970
$ git checkout pull/1970

Update a local copy of the PR:
$ git checkout pull/1970
$ git pull https://git.openjdk.org/jfx.git pull/1970/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1970

View PR using the GUI difftool:
$ git pr show -t 1970

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1970.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 11, 2025

👋 Welcome back mhanl! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Nov 11, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the rfr Ready for review label Nov 11, 2025
@mlbridge
Copy link

mlbridge bot commented Nov 11, 2025

Webrevs

@kevinrushforth
Copy link
Member

Reviewers: @johanvos @tiainen and one of @kevinrushforth or @arapte

/reviewers 2 reviewers

@openjdk
Copy link

openjdk bot commented Nov 11, 2025

@kevinrushforth
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 2 Reviewers).

@nlisker
Copy link
Collaborator

nlisker commented Nov 11, 2025

Note that there's a relevant stale PR in #1232 by @jjohannes. Maybe he'd like to take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rfr Ready for review

Development

Successfully merging this pull request may close these issues.

3 participants