jamesfredley commented on code in PR #16025:
URL: https://github.com/apache/grails-core/pull/16025#discussion_r3677413436
##########
build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/GrailsCodeAnalysisPlugin.groovy:
##########
@@ -170,16 +178,25 @@ class GrailsCodeAnalysisPlugin implements Plugin<Project>
{
def xmlReport = spotBugsReports.maybeCreate('xml')
xmlReport.required.set(true)
xmlReport.outputLocation.set(
- project.extensions.getByType(GrailsCodeAnalysisExtension)
- .reportsDirectory.get()
- .dir('spotbugs')
- .file("${project.name}-${it.name}.xml")
+
project.extensions.getByType(GrailsCodeAnalysisExtension)
Review Comment:
Fixed. The indentation is back to the original, and the chain is back to
`.reportsDirectory.get().dir(...).file(...)` rather than a GString path. Worth
noting the `.get()` is load-bearing: `DirectoryProperty.dir(String)` returns a
`Provider<Directory>`, which has no `file(String)`, so the original form is the
one that actually compiles under `@CompileStatic`.
##########
build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/GrailsCodeStylePlugin.groovy:
##########
@@ -161,11 +163,12 @@ class GrailsCodeStylePlugin implements Plugin<Project> {
// Redirect XML report output to a single directory to consolidate
// reports across all subprojects into one known location
task.reports.xml.outputLocation.set(
- project.extensions.getByType(GrailsCodeStyleExtension)
- .reportsDirectory.get()
- .dir('checkstyle')
- .file("${project.name}-${task.name}.xml")
+
project.extensions.getByType(GrailsCodeStyleExtension)
Review Comment:
Fixed, indentation restored to the original.
##########
build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/GrailsCodeStylePlugin.groovy:
##########
@@ -161,11 +163,12 @@ class GrailsCodeStylePlugin implements Plugin<Project> {
// Redirect XML report output to a single directory to consolidate
// reports across all subprojects into one known location
task.reports.xml.outputLocation.set(
- project.extensions.getByType(GrailsCodeStyleExtension)
- .reportsDirectory.get()
- .dir('checkstyle')
- .file("${project.name}-${task.name}.xml")
+
project.extensions.getByType(GrailsCodeStyleExtension)
+ .reportsDirectory
+
.file("checkstyle/${GradleUtils.reportFileName(project, task.name)}")
Review Comment:
Restored to `.reportsDirectory.get().dir('checkstyle').file(...)`. The file
name still comes from `GradleUtils.reportFileName(project, task.name)` so
nested projects with the same leaf name cannot collide, but the call shape and
indentation are back to the original.
##########
build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/GrailsCodeStylePlugin.groovy:
##########
@@ -201,11 +205,12 @@ class GrailsCodeStylePlugin implements Plugin<Project> {
// reports across all subprojects into one known location
task.reports.xml.required.set(true)
task.reports.xml.outputLocation.set(
- project.extensions.getByType(GrailsCodeStyleExtension)
- .reportsDirectory.get()
- .dir('codenarc')
- .file("${project.name}-${task.name}.xml")
+
project.extensions.getByType(GrailsCodeStyleExtension)
Review Comment:
Fixed, indentation restored to the original.
##########
build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/GrailsCodeStylePlugin.groovy:
##########
@@ -201,11 +205,12 @@ class GrailsCodeStylePlugin implements Plugin<Project> {
// reports across all subprojects into one known location
task.reports.xml.required.set(true)
task.reports.xml.outputLocation.set(
- project.extensions.getByType(GrailsCodeStyleExtension)
- .reportsDirectory.get()
- .dir('codenarc')
- .file("${project.name}-${task.name}.xml")
+
project.extensions.getByType(GrailsCodeStyleExtension)
+ .reportsDirectory
+
.file("codenarc/${GradleUtils.reportFileName(project, task.name)}")
Review Comment:
Restored to `.reportsDirectory.get().dir('codenarc').file(...)`, same as the
Checkstyle block.
##########
build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/GrailsViolationAggregationPlugin.groovy:
##########
@@ -74,6 +74,8 @@ class GrailsViolationAggregationPlugin implements
Plugin<Project> {
static final String DEFAULT_JACOCO_EXCLUDED_CLASS_PREFIXES =
'org.grails.orm.hibernate.support.hibernate7.'
+ private static final String CANONICAL_ROOT_MARKER = '.github/workflows'
Review Comment:
Good catch, fixed. `CANONICAL_ROOT_MARKER` is deleted and the canonical-root
test now goes through `GradleUtils.findRootGrailsCoreDir(project)`, comparing
the located ASF root against the project directory. `grails-gradle` and the
other independent builds still do not get the conventions task, and the spec
that proves that is unchanged.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]