-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
48 lines (41 loc) · 1.51 KB
/
build.gradle.kts
File metadata and controls
48 lines (41 loc) · 1.51 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
plugins {
`java-library`
alias { libs.plugins.spotless } apply false
}
subprojects {
apply { plugin("com.diffplug.spotless") }
apply { plugin("java-library") }
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
withJavadocJar()
withSourcesJar()
}
tasks {
javadoc {
options.encoding = Charsets.UTF_8.name()
}
processResources {
filteringCharset = Charsets.UTF_8.name()
}
}
extensions.configure<com.diffplug.gradle.spotless.SpotlessExtension> {
var redisBungeeProjects = sequenceOf("RedisBungee-API", "RedisBungee-Lang", "RedisBungee-Commands", "RedisBungee-Bungee", "RedisBungee-Proxy-Bungee", "RedisBungee-Velocity", "RedisBungee-Proxy-Velocity")
var apiProjects = sequenceOf("valiobungee-api", "valiobungee-velocity-api")
java {
removeUnusedImports()
googleJavaFormat()
if (apiProjects.contains(project.name)) {
licenseHeaderFile(rootProject.file("api/copyright_header.txt"))
} else if (redisBungeeProjects.contains(project.name)) {
licenseHeaderFile(rootProject.file("redisbungee/copyright_header.txt"))
} else {
licenseHeaderFile(rootProject.file("copyright_header.txt"))
}
if (project.name == "valiobungee-core") {
targetExclude("**/net/limework/valiobungee/core/proto/**")
}
}
}
}