-
Notifications
You must be signed in to change notification settings - Fork 416
Expand file tree
/
Copy pathbuild.gradle
More file actions
90 lines (75 loc) · 2.2 KB
/
build.gradle
File metadata and controls
90 lines (75 loc) · 2.2 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
buildscript {
repositories {
mavenCentral()
maven { url = "https://plugins.gradle.org/m2/" }
}
}
plugins {
id("com.github.spotbugs") version "6.4.8"
}
defaultTasks 'build'
wrapper {
gradleVersion = '9.3.1'
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: 'eclipse'
apply plugin: 'idea'
apply plugin: 'project-report'
apply plugin: 'com.github.spotbugs'
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.9.8" // com.github.spotbugs:spotbugs-annotations
reportsDir = file("$project.buildDir/reports/SpotBugsReports")
effort = com.github.spotbugs.snom.Effort.MAX
reportLevel = com.github.spotbugs.snom.Confidence.valueOf("HIGH")
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
compileJava {
options.encoding = 'utf-8'
options.deprecation = true
options.compilerArgs += ['-Xlint:unchecked', '-parameters']
}
dependencies {
testImplementation(
'org.mockito:mockito-core:5.22.0',
)
}
test {
jvmArgs '--add-opens=java.desktop/sun.awt.image=ALL-UNNAMED'
minHeapSize = "128m"
maxHeapSize = "1G"
testLogging {
exceptionFormat = 'full'
}
}
tasks.withType(Javadoc).tap {
configureEach {
options.encoding = 'utf-8'
}
}
}
tasks.register('docs') {
enabled = false
}