/* * This file was generated by the Gradle 'init' task. */ plugins { // Apply the java Plugin to add support for Java. java id("org.cyclonedx.bom") } repositories { // Use Maven Central for resolving dependencies. mavenCentral() } dependencies { constraints { // Define dependency versions as constraints implementation("org.apache.commons:commons-text:1.10.0") } // Use JUnit Jupiter for testing. testImplementation("org.junit.jupiter:junit-jupiter:5.9.3") testRuntimeOnly("org.junit.platform:junit-platform-launcher") } // Apply a specific Java toolchain to ease working on different environments. java { toolchain { languageVersion.set(JavaLanguageVersion.of(21)) } } tasks.named("test") { // Use JUnit Platform for unit tests. useJUnitPlatform() } tasks.cyclonedxBom { setIncludeConfigs(listOf("runtimeClasspath")) setSkipConfigs(listOf("compileClasspath", "testCompileClasspath")) setProjectType("application") setSchemaVersion("1.5") setDestination(project.file("build/reports")) setOutputName("bom") setOutputFormat("json") setIncludeBomSerialNumber(false) setComponentVersion("2.0.0") }