We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We should publish the Bill of Materials (BOM) files to the Artifact repository along with the Java Archive (JAR) file, similar to how it's done with the Maven plugin." ( e.g: https://repo1.maven.org/maven2/org/cyclonedx/cyclonedx-maven-plugin/2.7.11/ )
The text was updated successfully, but these errors were encountered:
Here is a solution until it'll we added inside the plugin. Place this part of code inside your root build.gradle.kts file:
allprojects { apply(plugin = "org.cyclonedx.bom") tasks.cyclonedxBom { setOutputName("bom") setOutputFormat("json") setIncludeBomSerialNumber(true) setIncludeLicenseText(true) setComponentVersion("2.0.0") } afterEvaluate { val bomTask = tasks.cyclonedxBom.get() val bomFile = File(bomTask.outputs.files.singleFile, "${bomTask.outputName.get()}.${bomTask.outputFormat.get()}") val mavenPublish = extensions.findByName(PublishingExtension.NAME) as? PublishingExtension mavenPublish?.publications?.filterIsInstance<MavenPublication>()?.forEach { it.artifact(bomFile) { classifier = "bom" } } tasks.matching { it.group == PublishingExtension.NAME }.configureEach { dependsOn(bomTask) } } }
Hope it helps.
Sorry, something went wrong.
@vguignot-ingenico Thank you for your response and for sharing this solution, I really appreciate it.
No branches or pull requests
We should publish the Bill of Materials (BOM) files to the Artifact repository along with the Java Archive (JAR) file, similar to how it's done with the Maven plugin." ( e.g: https://repo1.maven.org/maven2/org/cyclonedx/cyclonedx-maven-plugin/2.7.11/ )
The text was updated successfully, but these errors were encountered: