You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by ja...@apache.org on 2026/04/25 16:11:09 UTC

(grails-core) 02/07: Drop redundant explanatory comments flagged in PR #15365 review

This is an automated email from the ASF dual-hosted git repository.

jamesfredley pushed a commit to branch upgrade/gradle-9.3.1
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit 5d21fc3a392d9fe2a42287b5d5af08fbd1a89eba
Author: James Fredley <ja...@users.noreply.github.com>
AuthorDate: Sat Apr 25 10:25:00 2026 -0400

    Drop redundant explanatory comments flagged in PR #15365 review
    
    Remove the four comments jdaugherty flagged as restating obvious build
    mechanics:
    
    * gradle.properties: '# CycloneDX Gradle plugin version' above
      gradleCycloneDxPluginVersion - the property name already states this.
    * grails-bom/build.gradle (extractConstraints task): comment about
      capturing services at configuration time - the captureProjectServices
      call is self-explanatory once the team is on Gradle 9.
    * GrailsGradlePlugin.createNative2AsciiTask: 'Capture ant builder at
      configuration time to avoid Task.project access at execution time'
      plus its config-cache doc URL - obvious once Gradle 9 is the baseline.
    * GrailsProfileGradlePlugin.processProfileResources: 'Use Sync task type
      instead of project.sync in doLast to avoid Task.project access at
      execution time' plus its config-cache doc URL - same rationale.
    
    No behavior change.
    
    Assisted-by: claude-code:claude-opus-4-7
---
 gradle.properties                                                       | 1 -
 grails-bom/build.gradle                                                 | 1 -
 .../main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy | 2 --
 .../org/grails/gradle/plugin/profiles/GrailsProfileGradlePlugin.groovy  | 2 --
 4 files changed, 6 deletions(-)

diff --git a/gradle.properties b/gradle.properties
index 816080c951..3744fcdb5d 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -50,7 +50,6 @@ yakworksHibernateGroovyProxyVersion=1.1
 # Build dependency versions not managed by BOMs
 apacheRatVersion=0.8.1
 gradleChecksumPluginVersion=1.4.0
-# CycloneDX Gradle plugin version
 gradleCycloneDxPluginVersion=3.0.0
 
 # micronaut libraries not in the bom due to the potential for spring mismatches
diff --git a/grails-bom/build.gradle b/grails-bom/build.gradle
index 7c5d6e771d..ef0824ff3d 100644
--- a/grails-bom/build.gradle
+++ b/grails-bom/build.gradle
@@ -107,7 +107,6 @@ configurations.register('bomDependencies').configure {
 }
 
 tasks.register('extractConstraints', ExtractDependenciesTask).configure { ExtractDependenciesTask it ->
-    // Capture project services at configuration time so the task avoids the deprecated Task.project at execution time
     it.captureProjectServices(project.dependencies, project.configurations)
     it.configuration = configurations.named('bomDependencies')
     it.configurationName = 'bomDependencies'
diff --git a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy
index 41a0dc790e..36518da7be 100644
--- a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy
+++ b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy
@@ -978,8 +978,6 @@ ${importStatements}
             it.inputs.dir(src)
             it.outputs.dir(dest)
 
-            // Capture ant builder at configuration time 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
             def antBuilder = it.ant
 
             it.doLast {
diff --git a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/profiles/GrailsProfileGradlePlugin.groovy b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/profiles/GrailsProfileGradlePlugin.groovy
index d3200849e3..6f7d552bf8 100644
--- a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/profiles/GrailsProfileGradlePlugin.groovy
+++ b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/profiles/GrailsProfileGradlePlugin.groovy
@@ -87,8 +87,6 @@ class GrailsProfileGradlePlugin implements Plugin<Project> {
         project.configurations.named('runtimeElements')
                 .configure { it.extendsFrom(runtimeOnlyConfiguration.get()) }
 
-        // 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'