-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
91 lines (85 loc) · 2.64 KB
/
build.gradle
File metadata and controls
91 lines (85 loc) · 2.64 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
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
plugins {
id 'base'
id 'idea'
}
allprojects {
group 'com.github.slamdev.openapispringgenerator'
}
subprojects {
plugins.withId('java') {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
compileJava {
options.encoding = 'UTF-8'
options.compilerArgs << '-Xlint:unchecked' << '-Xlint:deprecation' << '-Werror'
}
compileTestJava {
options.encoding = 'UTF-8'
options.compilerArgs << '-Xlint:unchecked' << '-Xlint:deprecation' << '-Werror'
}
repositories {
mavenCentral()
}
}
plugins.withId('pmd') {
pmd {
toolVersion = '6.50.0'
ignoreFailures = false
consoleOutput = false
}
tasks.withType(Pmd) {
if (name == 'pmdMain') {
source = 'src/main/java'
ruleSetFiles = files('gradle/lint/pmd/ruleSetMain.xml')
ruleSets = []
} else {
ruleSetFiles = files('gradle/lint/pmd/ruleSetTest.xml')
ruleSets = []
}
exclude '**/api/**'
exclude '**/stream/**'
}
}
plugins.withId('checkstyle') {
checkstyle {
toolVersion = '10.3.4'
ignoreFailures = false
showViolations = false
}
tasks.withType(Checkstyle) {
if (name == 'checkstyleMain') {
source = 'src/main/java'
configFile = file('gradle/lint/checkstyle/checkstyleMain.xml')
} else {
configFile = file('gradle/lint/checkstyle/checkstyleTest.xml')
}
exclude '**/api/**'
exclude '**/stream/**'
}
dependencies {
checkstyle 'com.thomasjensen.checkstyle.addons:checkstyle-addons:7.0.1'
checkstyle 'com.github.sevntu-checkstyle:sevntu-checks:1.43.0'
}
}
plugins.withId('com.github.spotbugs') {
spotbugs {
toolVersion = '4.7.2'
ignoreFailures = false
effort = 'max'
reportLevel = 'low'
}
tasks.withType(VerificationTask) {
if (name.startsWith('spotbugs')) {
if (name == 'spotbugsMain') {
excludeFilter = file('gradle/lint/findbugs/excludeMain.xml')
} else {
excludeFilter = file('gradle/lint/findbugs/excludeTest.xml')
}
reports {
xml.enabled = false
html.enabled = true
}
}
}
}
}