-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
73 lines (61 loc) · 1.96 KB
/
build.gradle.kts
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
plugins {
id("java")
}
subprojects {
apply(plugin = "java")
apply(plugin = "maven-publish")
group = rootProject.group
version = rootProject.version
repositories {
mavenCentral()
maven("https://repo.glaremasters.me/repository/public")
maven("https://oss.sonatype.org/content/repositories/snapshots/")
}
dependencies {
compileOnly(rootProject.libs.findbugs)
testImplementation(rootProject.libs.bundles.junit.jupiter)
testImplementation(rootProject.libs.bundles.mockito)
}
configurations.all {
resolutionStrategy {
cacheChangingModulesFor(5, "MINUTES")
}
}
tasks {
configure<JavaPluginExtension> {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
disableAutoTargetJvm()
withJavadocJar()
withSourcesJar()
}
withType<JavaCompile> {
val disabledLint = listOf("processing", "path", "fallthrough", "serial")
options.release.set(11)
options.compilerArgs.addAll(listOf("-Xlint:all") + disabledLint.map { "-Xlint:-$it" })
options.isDeprecation = true
options.encoding = "UTF-8"
options.compilerArgs.add("-parameters")
}
withType<Test>().configureEach {
useJUnitPlatform()
}
withType<Javadoc>().configureEach {
options.encoding = "UTF-8"
(options as StandardJavadocDocletOptions).apply {
addStringOption("Xdoclint:none", "-quiet")
tags(
"apiNote:a:API Note:",
"implSpec:a:Implementation Requirements:",
"implNote:a:Implementation Note:"
)
}
}
named<Jar>("jar") {
manifest {
attributes("Implementation-Version" to rootProject.version)
}
}
}
}