-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
60 lines (53 loc) · 1.37 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
plugins {
`java-library`
`maven-publish`
alias(libs.plugins.spotless)
}
subprojects {
apply(plugin = "java-library")
apply(plugin = "maven-publish")
apply(plugin = "com.diffplug.spotless")
repositories {
gradlePluginPortal()
mavenCentral()
mavenLocal()
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.codemc.org/repository/nms/")
}
java {
withJavadocJar()
toolchain.languageVersion.set(JavaLanguageVersion.of(8))
}
dependencies {
api("org.jetbrains:annotations:24.0.1")
}
spotless {
java {
licenseHeaderFile("$rootDir/license/header.txt")
trimTrailingWhitespace()
indentWithSpaces(2)
}
kotlinGradle {
trimTrailingWhitespace()
indentWithSpaces(2)
}
}
tasks {
compileJava {
dependsOn("spotlessApply")
options.compilerArgs.add("-parameters")
}
javadoc {
options.encoding = Charsets.UTF_8.name()
destinationDir = file("javadoc")
}
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
}
}
}
}