Skip to content

Conversation

@jdaugherty
Copy link
Contributor

@jdaugherty jdaugherty commented Dec 1, 2025

Follow-up to #15114 for java-config.gradle

This PR also introduces a SharedProperties plugin that when applied will "inherit" all gradle.properties up to the root directory. For duplicate property handling, it will not replace the property if previously defined.

@jdaugherty jdaugherty force-pushed the gradle-centralization branch from f61388f to 883ecc7 Compare December 1, 2025 14:50
@jdaugherty jdaugherty marked this pull request as ready for review December 1, 2025 20:38
Copy link
Contributor

@matrei matrei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @jdaugherty !
The suggestions to remove applying the groovy plugin might need #15273 if the gsp plugin is applied before the web or plugin plugins.

Comment on lines 37 to 44
static Directory findAsfRoot(Directory currentDirectory) {
def asfFile = currentDirectory.file('.asf.yaml').asFile
if (asfFile.exists()) {
return currentDirectory
}

// we currently only nest 1 project level deep
rootLayout.projectDirectory.dir('../')
findAsfRoot(currentDirectory.dir('../'))
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
static Directory findAsfRoot(Directory currentDirectory) {
def asfFile = currentDirectory.file('.asf.yaml').asFile
if (asfFile.exists()) {
return currentDirectory
}
// we currently only nest 1 project level deep
rootLayout.projectDirectory.dir('../')
findAsfRoot(currentDirectory.dir('../'))
}
static Directory findAsfRoot(Directory currentDirectory) {
def rootIndicator = currentDirectory.file('.asf.yaml').asFile
rootIndicator.exists() ? currentDirectory : findAsfRoot(currentDirectory.dir('../'))
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matrei take a look at the modified version i pushed. I did most of your changes, but I think it's still more clear to indicate the file name given that the method is called findAsfRoot

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume ok means you're ok with this change now?

*/

plugins {
id 'groovy'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove groovy?


plugins {
id 'application'
id 'groovy'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove groovy?

@jdaugherty
Copy link
Contributor Author

@matrei I don't think we can take #15273 until Grails 8 because there's a subtle change in behavior with the updated PR.

Prior to this change, if you did withPlugin('groovy'), it would wait until the grails plugin is initialized. After, it will occur mid initialization. I think it's correct behavior in the PR, but it's still a breaking change.

…ce is used instead of java"

This reverts commit 068553e.
@jdaugherty
Copy link
Contributor Author

I think the plan is to wait on the 'groovy' removals until the gsp plugin / other plugin is fixed in 8.0. So this is ready to merge once we have another approval

@jdaugherty jdaugherty merged commit 712a1c0 into 7.0.x Dec 3, 2025
36 checks passed
@jdaugherty jdaugherty deleted the gradle-centralization branch December 5, 2025 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants