forked from Santulator/Santulator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
110 lines (89 loc) · 2.61 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
/*
* Open Source Software published under the Apache Licence, Version 2.0.
*/
import org.gradle.internal.os.OperatingSystem
ext {
operatingSystem = OperatingSystem.current()
}
allprojects {
group 'io.github.santulator'
}
wrapper {
description 'Setup the Gradle wrapper'
gradleVersion = '6.8.3'
distributionUrl = "https://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"
}
buildscript {
repositories {
mavenCentral()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'com.github.ben-manes:gradle-versions-plugin:0.38.0'
classpath 'net.researchgate:gradle-release:2.8.1'
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.1.1'
classpath 'gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.7.0'
}
}
apply plugin: 'base'
apply plugin: 'net.researchgate.release'
apply plugin: 'org.sonarqube'
apply plugin: 'com.github.ben-manes.versions'
subprojects {
apply plugin: 'java'
apply plugin: 'pmd'
apply plugin: 'checkstyle'
apply plugin: 'com.github.spotbugs'
apply plugin: 'jacoco'
sourceCompatibility = 11
targetCompatibility = 11
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.1'
testImplementation 'org.mockito:mockito-junit-jupiter:3.8.0'
runtimeOnly 'ch.qos.logback:logback-classic:1.2.3'
}
test {
useJUnitPlatform()
}
pmd {
toolVersion = '6.32.0'
ruleSetFiles = files("$rootProject.projectDir/config/pmd/ruleset.xml")
ruleSets = []
}
checkstyle {
toolVersion = '8.41'
configFile = file("$rootProject.projectDir/config/checkstyle/checkstyle.xml")
}
[checkstyleMain, checkstyleTest].each { task ->
task.logging.setLevel(LogLevel.LIFECYCLE)
}
spotbugs {
toolVersion = '4.2.1'
effort = 'max'
reportLevel = 'medium'
excludeFilter = file("$rootProject.projectDir/config/spotbugs/excludeFilter.xml")
}
tasks.withType(com.github.spotbugs.snom.SpotBugsTask) {
reports {
xml.enabled = false
html.enabled = true
}
}
jacoco {
toolVersion = '0.8.6'
}
jacocoTestReport {
reports {
xml.enabled true
xml.destination file("${buildDir}/reports/jacoco/report.xml")
}
}
[compileJava, compileTestJava].each { task ->
task.options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-Werror"
}
}