-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
94 lines (81 loc) · 2.47 KB
/
Copy pathbuild.gradle
File metadata and controls
94 lines (81 loc) · 2.47 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
plugins {
id 'java'
id 'signing'
id("io.github.sgtsilvio.gradle.maven-central-publishing") version "0.4.1"
id("com.github.spotbugs") version "6.4.2"
id "org.sonarqube" version "6.3.1.5724"
}
group = 'io.github.yyubin'
version = '0.1.4'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
// Remove vendor restriction for better compatibility
}
}
allprojects {
repositories { mavenCentral() }
group = rootProject.group
version = rootProject.version
// Force Java 21 toolchain for all subprojects
plugins.withType(JavaPlugin) {
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
// Remove vendor restriction for better compatibility
}
}
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
ext {
versions = [
junit : '5.10.0',
jackson : '2.15.2',
lombok : '1.18.32',
picocli : '4.7.5',
jpaApi : '3.2.0',
autoService : '1.1.1',
mockito : '5.4.0',
assertj : '3.27.3',
]
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'jacoco'
dependencies {
compileOnly "org.projectlombok:lombok:${versions.lombok}"
annotationProcessor "org.projectlombok:lombok:${versions.lombok}"
testImplementation platform("org.junit:junit-bom:${versions.junit}")
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.2")
testImplementation "org.mockito:mockito-core:${versions.mockito}"
testImplementation("org.mockito:mockito-junit-jupiter:5.11.0")
testImplementation("org.assertj:assertj-core:${versions.assertj}")
}
test {
useJUnitPlatform()
finalizedBy 'jacocoTestReport'
}
jacoco {
toolVersion = "0.8.12"
}
jacocoTestReport {
reports {
xml.required = true
html.required = true
}
afterEvaluate {
classDirectories.setFrom(
files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
'**/model/**'
])
})
)
}
}
}