jdaugherty commented on code in PR #15365:
URL: https://github.com/apache/grails-core/pull/15365#discussion_r3061884293
##########
grails-gradle/bom/build.gradle:
##########
@@ -43,8 +43,9 @@ dependencies {
exclude group: 'com.fasterxml.jackson'
}
- // Because gradle uses groovy 3, we must use groovy 3 compatible versions
for the grails-gradle-bom
- api platform("org.codehaus.groovy:groovy-bom:${GroovySystem.version}")
+ // Use Gradle's embedded Groovy version for the grails-gradle-bom
+ // Groovy 4+ uses org.apache.groovy coordinates
+ api platform("org.apache.groovy:groovy-bom:${GroovySystem.version}")
Review Comment:
We are setting it to the gradle groovy version in some places and then the
grails-gradle-bom in others. I'd suggest we extract the groovy version into the
gradle bom map in dependencies.gradle then reference that variable here so
we're consistent on the same version.
##########
.sdkmanrc:
##########
@@ -2,5 +2,5 @@
java=17.0.18-librca
# Keep gradle version synced with gradle.properties (gradleToolingApiVersion),
all gradle-wrapper.properties files,
Review Comment:
We should update this comment, you just have to update the bootstrap project
and it will copy these to the right locations, only the api update is needed.
##########
gradle.properties:
##########
@@ -54,15 +54,15 @@ gradleChecksumPluginVersion=1.4.0
gradleCycloneDxPluginVersion=2.4.1
Review Comment:
2.4.1 does not officially support gradle 9.x. 3.0.0 is a requirement to
upgrade to Gradle 9.
##########
build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/SbomPlugin.groovy:
##########
@@ -208,6 +209,12 @@ class SbomPlugin implements Plugin<Project> {
// cyclonedx does not support "choosing" the license placed in
the sbom
// see:
https://github.com/CycloneDX/cyclonedx-gradle-plugin/issues/16
+ // Capture project name at configuration time to avoid
deprecated Task.project access at execution time
+ // See:
https://docs.gradle.org/current/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
+ def projectName = project.name
+ def projectPath = project.path
+ boolean isReproducibleBuild = lookupProperty(project,
'isReproducibleBuild')
+ ZonedDateTime buildDate = lookupProperty(project, 'buildDate')
Review Comment:
This should be a provider that's still looked up at execution time.
##########
grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/profiles/GrailsProfileGradlePlugin.groovy:
##########
@@ -87,48 +87,30 @@ class GrailsProfileGradlePlugin implements Plugin<Project> {
project.configurations.named('runtimeElements')
.configure { it.extendsFrom(runtimeOnlyConfiguration.get()) }
- TaskProvider<Task> processProfileResourcesTask =
project.tasks.register('processProfileResources')
- processProfileResourcesTask.configure { Task task ->
+ // Use Sync task type instead of project.sync in doLast to avoid
Task.project access at execution time
+ // See:
https://docs.gradle.org/current/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
+ TaskProvider<Sync> processProfileResourcesTask =
project.tasks.register('processProfileResources', Sync)
+ processProfileResourcesTask.configure { Sync task ->
task.group = 'build'
Review Comment:
Why were the inputs removed?
##########
grails-test-examples/plugins/issue-11767/build.gradle:
##########
@@ -40,3 +40,29 @@ apply {
from
rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle')
from
rootProject.layout.projectDirectory.file('gradle/grails-extension-gradle-config.gradle')
}
+
+// Both compileJava and compileGroovy run the Micronaut annotation processor,
each generating
Review Comment:
Isn't compileJava supposed to be disabled? We don't even have java code in
this test. This seems like something else is wrong.
##########
build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/SbomPlugin.groovy:
##########
@@ -208,6 +209,12 @@ class SbomPlugin implements Plugin<Project> {
// cyclonedx does not support "choosing" the license placed in
the sbom
// see:
https://github.com/CycloneDX/cyclonedx-gradle-plugin/issues/16
+ // Capture project name at configuration time to avoid
deprecated Task.project access at execution time
+ // See:
https://docs.gradle.org/current/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
+ def projectName = project.name
+ def projectPath = project.path
+ boolean isReproducibleBuild = lookupProperty(project,
'isReproducibleBuild')
Review Comment:
This should be a provider, that's still looked up at execution time.
--
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]