-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathbuild.gradle
More file actions
76 lines (63 loc) · 2.01 KB
/
build.gradle
File metadata and controls
76 lines (63 loc) · 2.01 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
/*
* Master Gradle build script
* Updated for JDK 21 compatibility
*/
plugins {
id 'biz.aQute.bnd' version '6.4.0' apply false
id 'com.diffplug.spotless' version '6.25.0' apply false
id 'org.owasp.dependencycheck' version '9.0.9' apply false
}
allprojects {
repositories {
mavenCentral()
gradlePluginPortal()
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'biz.aQute.bnd'
apply plugin: 'com.diffplug.spotless'
// apply plugin: 'checkstyle'
// apply plugin: 'pmd'
// apply plugin: 'org.owasp.dependencycheck'
// Spotless configuration for code formatting
spotless {
java {
// Use Eclipse formatter from .settings/eclipse-java-formatter.xml
eclipse().configFile(rootProject.file('.settings/eclipse-java-formatter.xml'))
// Ensure files end with a newline
endWithNewline()
// Remove trailing whitespace
trimTrailingWhitespace()
// Target all Java files
target 'src/**/*.java', 'test/**/*.java'
// Exclude generated files
targetExclude 'build/**', 'bin/**', 'generated/**'
}
}
// Explicit Java toolchain configuration for JDK 21
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
// Configure encoding
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.release = 21
}
// Configure JUnit 5 platform for tests
tasks.withType(Test) {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
showStandardStreams = true
}
}
// Code quality configuration disabled for now
// Print build info
def javaVersion = System.getProperty('java.version')
println "Building ${project.name} with Java ${javaVersion} (target: ${java.targetCompatibility})"
}