-
-
Notifications
You must be signed in to change notification settings - Fork 967
Centralizing Gradle Logic - java-config #15269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… gradle.properties files
f61388f to
883ecc7
Compare
matrei
left a comment
There was a problem hiding this 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.
build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/CompilePlugin.groovy
Outdated
Show resolved
Hide resolved
build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/GradleUtils.groovy
Outdated
Show resolved
Hide resolved
build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/GradleUtils.groovy
Show resolved
Hide resolved
| 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('../')) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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('../')) | |
| } | |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove groovy?
|
@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.
|
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 |
Follow-up to #15114 for
java-config.gradleThis 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.