-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
118 lines (99 loc) · 2.8 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
plugins {
id 'java-gradle-plugin'
id 'groovy'
// Apply the Plugin Publish Plugin to make plugin publication possible
id 'com.gradle.plugin-publish' version '0.20.0'
// Apply the Maven Publish Plugin to have it generate the publication metadata
id 'maven-publish'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.vdurmont:semver4j:3.1.0'
testImplementation 'org.assertj:assertj-core:3.22.0'
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.mockito:mockito-core:3.7.7'
testImplementation 'org.mockito:mockito-junit-jupiter:3.7.7'
testImplementation 'org.spockframework:spock-core:2.0-groovy-3.0'
testImplementation(platform('org.junit:junit-bom:5.8.2'))
}
group = 'se.solrike.otsswinfo'
version = '1.0.0-beta.10'
sourceCompatibility = '11'
tasks.withType(GroovyCompile) {
configure(options) {
options.compilerArgs << '-Xlint:deprecation' << '-Xlint:unchecked'
}
}
javadoc {
enabled = false
}
sourceSets {
main {
java {
srcDirs = [] // don't compile Java code twice
}
groovy {
srcDirs = [
'src/main/groovy',
'src/main/java'
]
}
}
test {
java {
srcDirs = [] // don't compile Java code twice
}
groovy {
srcDirs = [
'src/test/groovy',
'src/test/java'
]
}
}
}
test {
useJUnitPlatform()
}
// publish the plugin like: ./gradlew publishPlugins
gradlePlugin {
plugins {
otsSwInfoPlugin {
id = 'se.solrike.otsswinfo'
implementationClass = 'se.solrike.otsswinfo.OtsSwInfoPlugin'
}
}
}
pluginBundle {
website = 'https://github.com/Lucas3oo/ots-sw-info-gradle-plugin'
vcsUrl = 'https://github.com/Lucas3oo/ots-sw-info-gradle-plugin'
description = '''
Gradle plugin to generate version and license reports for your Java (multi)project.
The plugin scans all the dependencies and the transitive dependencies (off the shelf software, OTS-SW)
and lists the version and license for each dependency.
The plugin creates a software bill-of-meterial report in CSV format.
The plugin can also generate an version up-to-date report for the dependencies.
The plugin can also check the license on each dependency if they are allowed according to a specified policy.
Min Gradle version 7.0.'''
plugins {
otsSwInfoPlugin {
// id is captured from java-gradle-plugin configuration
displayName = 'OTS SW info plugin'
tags = [
'version',
'license',
'up-to-date check',
'license check',
'bom',
'sbom',
'dependency',
'dependencies'
]
}
}
}
// to upgrade the metainfo about which gradle version we shall use. Run ./gradlew wrapper after you have updated the version. The commit the new wrapper files except the gradlew.bat
wrapper {
gradleVersion = '7.4'
}