@@ -247,32 +247,24 @@ dependencyCheck {
247247
248248// ---------------------------------------------------------------------------
249249// CycloneDX SBOM
250- // The SBOM is generated only for the root project (the distribution artifact).
251- // CycloneDX 3.x registers its tasks on every subproject in a multi-project
252- // build, which conflicts with java-library's configuration consumption order.
253- // Disabling the tasks in subprojects avoids that conflict while keeping the
254- // root-level SBOM generation intact .
250+ // Represents the shipped MethodAtlas distribution, not the internal Gradle
251+ // module layout.
252+ //
253+ // The root distribution contains both CLI and GUI runtime material, therefore
254+ // both runtimeClasspath and guiRuntime are included .
255255// ---------------------------------------------------------------------------
256- cyclonedxBom {
257- // includeConfigs was removed in 3.x; the task scans runtime configurations automatically.
256+ tasks. named(' cyclonedxDirectBom' ) {
258257 schemaVersion = org.cyclonedx.Version . VERSION_15
259- }
260258
261- // Mark CycloneDX-owned configurations as non-consumable so that subprojects
262- // which depend on project(':') (e.g. methodatlas-gui) do not resolve them
263- // as variants. Without this, Gradle marks the configuration as "consumed"
264- // before the CycloneDX plugin can add artifacts to it, which causes a
265- // "Cannot mutate after consumed" error at task-graph construction time.
266- configurations. all {
267- if (name. startsWith(' cyclonedx' )) {
268- canBeConsumed = false
269- }
259+ includeConfigs = [
260+ " runtimeClasspath" ,
261+ " guiRuntime"
262+ ]
270263}
271264
272- subprojects {
273- tasks. matching { it. name. startsWith(' cyclonedx' ) }. configureEach {
274- enabled = false
275- }
265+ // Prevent accidental use of the aggregate multi-project SBOM task.
266+ tasks. named(' cyclonedxBom' ) {
267+ enabled = false
276268}
277269
278270// ---------------------------------------------------------------------------
0 commit comments