-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathbuild.gradle
More file actions
107 lines (90 loc) · 2.67 KB
/
build.gradle
File metadata and controls
107 lines (90 loc) · 2.67 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:7.2.0'
}
}
plugins {
id 'com.github.spotbugs' version '6.4.8'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
}
apply plugin: 'io.github.gradle-nexus.publish-plugin'
// We require building with JDK 17 or later. Built artifact compatibility
// is controlled by javaLanguageVersion
assert JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)
group = 'com.fifesoft'
// NOTE: Local Java 17: /Library/Java/JavaVirtualMachines/jdk-17.0.13+11/Contents/Home
allprojects {
repositories {
mavenCentral()
maven {
url = 'https://central.sonatype.com/repository/maven-snapshots/'
}
}
wrapper {
gradleVersion = '9.2.1'
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'checkstyle'
apply plugin: 'com.github.spotbugs'
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
test {
useJUnitPlatform()
}
checkstyle {
toolVersion = '12.3.0'
configDirectory = file("$rootProject.projectDir/config/checkstyle")
}
spotbugs {
// Relative to subprojects
includeFilter = file('../config/spotbugs-exclude.xml')
}
spotbugsMain {
reports {
html {
required = true
}
xml {
required = false
}
}
}
spotbugsTest {
reports {
html {
required = true
}
xml {
required = false
}
}
}
dependencies {
testImplementation platform('org.junit:junit-bom:6.0.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
compileJava {
options.release = Integer.parseInt(javaLanguageVersion)
options.debug = true
options.debugOptions.debugLevel = 'source,vars,lines'
options.compilerArgs << "-Xlint:deprecation" << '-Xlint:unchecked'
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
// We must defensively check for these properties so CI builds work
username.set(project.hasProperty('sonatypeUsername') ? sonatypeUsername : 'unknown')
password.set(project.hasProperty('sonatypePassword') ? sonatypePassword : 'unknown')
}
}
}