-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
63 lines (53 loc) · 1.35 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
63 lines (53 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
plugins {
java
application
id("org.cyclonedx.bom") version "2.3.1"
id("com.github.johnrengelman.shadow") version "8.1.1"
}
group = "com.example.playground-gradle-release-manual-actions"
version = project.version
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
repositories {
mavenCentral()
}
dependencies {
implementation("info.picocli:picocli:4.7.0")
}
application {
mainClass.set("com.example.demo.DemoApplication")
}
tasks.jar {
manifest {
attributes("Implementation-Version" to project.version)
attributes("Main-Class" to "com.example.demo.DemoApplication")
}
}
tasks.withType<JavaCompile> {
options.isDeprecation = true
options.compilerArgs.add("-parameters")
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed", "standardOut", "standardError")
}
}
// Disable the default cyclonedxBom task: https://github.com/CycloneDX/cyclonedx-gradle-plugin/issues/596
tasks.named("cyclonedxBom") {
enabled = false
}
// Example: gradle sbom; vk-sbom-diff sbom-1.json sbom.json
tasks.register("sbom", org.cyclonedx.gradle.CycloneDxTask::class) {
setIncludeConfigs(listOf("runtimeClasspath"))
setProjectType("application")
setSchemaVersion("1.6")
setDestination(project.file("."))
setOutputName("sbom")
setOutputFormat("json")
setIncludeBomSerialNumber(false)
setIncludeLicenseText(false)
}