Skip to content
Discussion options

You must be logged in to vote

Got it working! Here it is:

import org.cyclonedx.gradle.CyclonedxPlugin
import org.cyclonedx.model.Component

initscript {
    repositories {
        gradlePluginPortal()
    }
    dependencies {
        classpath("org.cyclonedx.bom:org.cyclonedx.bom.gradle.plugin:3.1.0")
    }
}

allprojects {
    apply<CyclonedxPlugin>()

    afterEvaluate {
        tasks.named("cyclonedxDirectBom") {
            setProperty("includeConfigs", listOf("runtimeClasspath", "compileClasspath"))
            setProperty("skipConfigs", listOf("testRuntimeClasspath", "testCompileClasspath"))
            setProperty("projectType", Component.Type.LIBRARY)
            setProperty("schemaVersion", org.cyclonedx.Version

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by brunobastosg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant