-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
56 lines (48 loc) · 1.23 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
plugins {
id 'com.github.ben-manes.versions' version '0.51.0'
id 'se.solrike.sonarlint' version '1.0.0-beta.15' apply false
id 'com.github.spotbugs' version '6.0.19' apply false
id("net.thebugmc.gradle.sonatype-central-portal-publisher") version "1.2.3" apply false
}
version = '0.0.4'
wrapper {
gradleVersion = '8.9'
}
subprojects {
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'jacoco'
apply plugin: "se.solrike.sonarlint"
group 'io.github.chrisribble'
version rootProject.version
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
sonarlintPlugins libs.sonar.java.plugin
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) { task ->
options.compilerArgs.add('-Werror')
options.compilerArgs.add('-Xlint:all')
options.compilerArgs.add('-Xlint:-processing')
if (JavaVersion.current() >= JavaVersion.VERSION_21) {
options.compilerArgs.add('-Xlint:-this-escape')
}
}
tasks.withType(VerificationTask) { task ->
if (task.name.startsWith("spotbugs")) {
task.reports {
html.required = true
}
}
}
}
}