matrei commented on code in PR #15365:
URL: https://github.com/apache/grails-core/pull/15365#discussion_r3129207820


##########
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:
   @jdaugherty Are you sure this is necessary? Will the values ever be 
differerent at configuration vs 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]

Reply via email to