[Build] Use separate sbom directories per publication
Currently, `SpdxSbomTask` declares output file not as `@OutputFile`, but `@OutputDirectory` leading to overlapping outputs problem. This way the problem is worked around. #KTI-1221 In Progress
This commit is contained in:
committed by
Space Team
parent
407a2d4203
commit
786653baf2
@@ -47,8 +47,11 @@ fun Project.configureSbom(
|
||||
}
|
||||
}
|
||||
|
||||
val spdxSbomTask = tasks.named<SpdxSbomTask>("spdxSbomFor$targetName")
|
||||
val sbomFile = layout.buildDirectory.file("spdx/$targetName.spdx.json")
|
||||
val sbomOutputDirectory = layout.buildDirectory.dir("spdx/$targetName")
|
||||
val spdxSbomTask = tasks.named<SpdxSbomTask>("spdxSbomFor$targetName") {
|
||||
outputDirectory.set(sbomOutputDirectory)
|
||||
}
|
||||
val sbomFile = sbomOutputDirectory.map { it.file("$targetName.spdx.json") }
|
||||
val sbomCfg = configurations.maybeCreate("sbomFor$targetName").apply {
|
||||
isCanBeResolved = false
|
||||
isCanBeConsumed = true
|
||||
|
||||
Reference in New Issue
Block a user