forked from CycloneDX/cyclonedx-gradle-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
72 lines (59 loc) · 1.98 KB
/
build.gradle
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
64
65
66
67
68
69
70
71
72
plugins {
id 'java-gradle-plugin'
id 'com.gradle.plugin-publish' version '0.21.0'
id 'maven-publish'
id 'groovy'
id 'org.cyclonedx.bom' version '1.6.0'
}
repositories {
mavenCentral()
}
dependencies {
implementation(group: 'org.cyclonedx', name: 'cyclonedx-core-java', version: '7.1.4') {
// gradle-api already includes an slf4j binding
exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl'
}
implementation 'commons-codec:commons-codec:1.15'
implementation 'commons-io:commons-io:2.11.0'
implementation 'org.apache.maven:maven-core:3.8.5'
testImplementation gradleTestKit()
testImplementation("org.spockframework:spock-core:1.1-groovy-2.4") {
exclude module: 'groovy-all'
}
}
test {
useJUnit()
}
project.ext.organization = 'CycloneDX'
group = 'org.cyclonedx'
version = '1.6.0'
// populate properties into plugin.properties at build time
ant.propertyfile(file: "src/main/resources/plugin.properties") {
entry(key: "vendor", value: project.ext.organization)
entry(key: "name", value: project.name)
entry(key: "version", value: project.version)
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
pluginBundle {
website = 'https://cyclonedx.org'
vcsUrl = 'https://github.com/CycloneDX/cyclonedx-gradle-plugin.git'
tags = [ 'cyclonedx', 'dependency', 'dependencies', 'owasp', 'inventory', 'bom', 'sbom' ]
plugins {
cycloneDxPlugin {
displayName = 'CycloneDX BOM Generator'
description = 'The CycloneDX Gradle plugin creates an aggregate of all direct and transitive dependencies of a project and creates a valid CycloneDX Software Bill of Materials (SBOM).'
}
}
}
gradlePlugin {
plugins {
cycloneDxPlugin {
id = 'org.cyclonedx.bom'
implementationClass = 'org.cyclonedx.gradle.CycloneDxPlugin'
}
}
}