-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
115 lines (99 loc) · 3.83 KB
/
build.gradle
File metadata and controls
115 lines (99 loc) · 3.83 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
import java.text.SimpleDateFormat
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'java'
id 'groovy'
id 'idea'
id 'application'
id 'checkstyle'
id 'pmd'
id 'jacoco'
id 'project-report'
id 'build-dashboard'
id 'com.github.spotbugs' version "${spotbugsPluginVersion}"
id 'org.owasp.dependencycheck' version "${dependencyCheckVersion}"
id 'org.beryx.jlink' version "${jlinkPluginVersion}"
id 'org.javamodularity.moduleplugin' version "${modulePluginVersion}"
id 'org.jetbrains.changelog' version "${gitChangeLogPluginVersion}"
id 'com.github.kt3k.coveralls' version "${coverallsPluginVersion}"
id 'org.sonarqube' version "${sonarcubePluginVersion}"
id 'projectConfiguration'
}
repositories {
mavenCentral()
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
application {
mainModule = project.property('mainModule')
mainClass = project.property('mainClass')
}
changelog {
path = "${project.rootProject.projectDir}/CHANGELOG.md"
header = "[${-> version.get()}] - ${new SimpleDateFormat("yyyy-MM-dd").format(new Date())}"
headerParserRegex = ~/(\d+\.\d+)/
itemPrefix = "-"
keepUnreleasedSection = true
unreleasedTerm = "[Unreleased]"
groups = ["Added", "Changed", "Deprecated", "Removed", "Fixed", "Security"]
}
coveralls {
jacocoReportPath 'build/reports/jacoco/jacocoTestReport.xml'
}
sonarqube {
properties {
property "sonar.projectKey", "gregoranders_com.github.gregoranders.template"
property "sonar.organization", "gregoranders"
property "sonar.host.url", "https://sonarcloud.io"
}
}
def pluginsCheck = false
if (pluginsCheck) {
dependencies {
implementation(
[group: 'org.owasp', name: 'dependency-check-gradle', version: project.property('dependencyCheckVersion')],
[group: 'com.github.spotbugs', name: 'spotbugs', version: project.property('spotbugsVersion')],
[group: 'com.github.spotbugs.snom', name: 'spotbugs-gradle-plugin', version: project.property('spotbugsPluginVersion')],
[group: 'org.beryx', name: 'badass-jlink-plugin', version: project.property('jlinkPluginVersion')],
[group: 'org.javamodularity', name: 'moduleplugin', version: project.property('modulePluginVersion')]
)
}
}
dependencies {
implementation(
[group: 'org.slf4j', name: 'slf4j-api', version: project.property('slf4jVersion')],
)
runtimeOnly(
[group: 'ch.qos.logback', name: 'logback-core', version: project.property('logbackVersion')],
[group: 'ch.qos.logback', name: 'logback-classic', version: project.property('logbackVersion')],
[group: 'javax.servlet', name: 'javax.servlet-api', version: project.property('servletApiVersion')],
)
testImplementation(
platform(
[group: 'org.codehaus.groovy', name: 'groovy-bom', version: project.property('groovyVersion')]
),
platform(
[group: 'org.spockframework', name: 'spock-bom', version: project.property('spockVersion')]
),
[group: 'org.spockframework', name: 'spock-core'],
[group: 'io.github.joke', name: 'spock-mockable', version: project.property('spockMockableVersion')],
[group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: project.property('junitVersion')]
)
testRuntimeOnly(
[group: 'ch.qos.logback', name: 'logback-core', version: project.property('logbackVersion')],
[group: 'ch.qos.logback', name: 'logback-classic', version: project.property('logbackVersion')],
)
}
test {
useJUnitPlatform()
moduleOptions {
runOnClasspath = true
}
testLogging {
events 'passed', 'skipped', 'failed'
}
}