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

jdaugherty pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/grails-core.git


The following commit(s) were added to refs/heads/7.0.x by this push:
     new fab335598f [skip tests] use after evaluate until the sbom plugin 
supports lazy configuration (3.x)
fab335598f is described below

commit fab335598fb4146c73e9956ba57c4b318f17c09c
Author: James Daugherty <[email protected]>
AuthorDate: Thu Oct 9 08:54:06 2025 -0400

    [skip tests] use after evaluate until the sbom plugin supports lazy 
configuration (3.x)
---
 .../org/apache/grails/buildsrc/SbomPlugin.groovy   | 24 ++++++++++++----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git 
a/build-logic/src/main/groovy/org/apache/grails/buildsrc/SbomPlugin.groovy 
b/build-logic/src/main/groovy/org/apache/grails/buildsrc/SbomPlugin.groovy
index 9eb67c02db..bde5353d5d 100644
--- a/build-logic/src/main/groovy/org/apache/grails/buildsrc/SbomPlugin.groovy
+++ b/build-logic/src/main/groovy/org/apache/grails/buildsrc/SbomPlugin.groovy
@@ -290,18 +290,20 @@ class SbomPlugin implements Plugin<Project> {
         ['java', 'java-library'].each {
             project.plugins.withId(it) {
                 if (initialized.compareAndSet(false, true)) {
-                    if (!project.findProperty('skipJavaComponent')) {
-                        project.tasks.named('jar', Jar).configure { Jar jar ->
-                            jar.dependsOn('cyclonedxBom')
-                            jar.from(sbomOutputLocation) { CopySpec spec ->
-                                spec.into('META-INF')
-                                spec.rename {
-                                    'sbom.json'
+                    project.afterEvaluate {
+                        if (!project.findProperty('skipJavaComponent')) {
+                            project.tasks.named('jar', Jar).configure { Jar 
jar ->
+                                jar.dependsOn('cyclonedxBom')
+                                jar.from(sbomOutputLocation) { CopySpec spec ->
+                                    spec.into('META-INF')
+                                    spec.rename {
+                                        'sbom.json'
+                                    }
+                                }
+                                jar.manifest { Manifest manifest ->
+                                    manifest.attributes('Sbom-Location': 
'META-INF/sbom.json')
+                                    manifest.attributes('Sbom-Format': 
'CycloneDX')
                                 }
-                            }
-                            jar.manifest { Manifest manifest ->
-                                manifest.attributes('Sbom-Location': 
'META-INF/sbom.json')
-                                manifest.attributes('Sbom-Format': 'CycloneDX')
                             }
                         }
                     }

Reply via email to