-
Notifications
You must be signed in to change notification settings - Fork 416
/
build.gradle
89 lines (73 loc) · 2.19 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
buildscript {
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.7.5"
}
}
defaultTasks 'build'
wrapper {
gradleVersion = '8.10.2'
distributionType = Wrapper.DistributionType.ALL
}
allprojects {
group = group
version = version
}
configurations.configureEach {
resolutionStrategy {
force 'xml-apis:xml-apis:2.0.2'
}
}
configure(subprojects.findAll { ['core', 'examples'].contains(it.name) }) {
apply plugin: 'java'
apply plugin: 'com.github.spotbugs'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'project-report'
apply plugin: 'checkstyle'
jar.dependsOn(checkstyleMain)
checkstyle {
// Use the default version from Gradle
// https://github.com/gradle/gradle/blob/v6.7.1/subprojects/code-quality/src/main/groovy/org/gradle/api/plugins/quality/CheckstylePlugin.java#L37
configFile = file("$rootProject.rootDir/checkstyle_checks.xml")
configProperties = ['basedir': project.rootDir.path]
reportsDir = file("$project.buildDir/reports/CheckstyleReports")
}
spotbugs {
toolVersion = "4.7.3" // com.github.spotbugs:spotbugs-annotations
reportsDir = file("$project.buildDir/reports/SpotBugsReports")
effort = "max"
reportLevel = "high"
}
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
compileJava.options.compilerArgs = ['-Xlint:deprecation', '-Xlint:unchecked']
dependencies {
testImplementation(
"junit:junit:4.13.2",
'org.mockito:mockito-core:5.11.0',
)
}
test {
jvmArgs '-XX:+CMSClassUnloadingEnabled'
minHeapSize = "128m"
maxHeapSize = "512m"
testLogging {
exceptionFormat = 'full'
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'utf-8'
}
tasks.withType(Javadoc).tap {
configureEach {
options.encoding = 'utf-8'
}
}
}
tasks.register('docs') {
enabled = false
}