Do not publish SBOM artifact by default

* In case we generate several artifacts like in kotlin-compiler
there are separate jar and zip modules which differ in content
This commit is contained in:
Bogdan Mukvich
2023-05-10 14:59:00 +02:00
committed by Space Team
parent bbe5418a85
commit 303f7493cc
2 changed files with 20 additions and 27 deletions
+8 -2
View File
@@ -395,7 +395,11 @@ val distJs = distTask<Sync>("distJs") {
from(distJSContents)
}
val sbom = configureSbom(setOf("runtimeClasspath", libraries.name, librariesStripVersion.name, compilerPlugins.name))
val compilerZipSbomName = "kotlin-compiler-zip"
val compilerZipSbom = configureSbom(
moduleName = compilerZipSbomName,
gradleConfigurations = setOf("runtimeClasspath", libraries.name, librariesStripVersion.name, compilerPlugins.name)
)
distTask<Copy>("dist") {
destinationDir = File(distDir)
@@ -407,7 +411,9 @@ distTask<Copy>("dist") {
from(buildNumber)
from(distStdlibMinimalForTests)
fromSbom(sbom)
from(compilerZipSbom.artifacts.files) {
rename("$compilerZipSbomName.spdx.json", "${project.name}-${project.version}.spdx.json")
}
}
inline fun <reified T : AbstractCopyTask> Project.distTask(