-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
76 lines (65 loc) · 2.03 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
74
75
76
// TODO clean up the buildscript
plugins {
id("java-library")
id("maven-publish")
}
subprojects.filter { it.name != "toky-bom" }.forEach {
it.apply(plugin = "java-library")
it.apply(plugin = "maven-publish")
it.repositories {
mavenCentral()
maven("https://libraries.minecraft.net")
}
it.dependencies {
api("net.kyori:adventure-key:4.10.1")
api("com.mojang:datafixerupper:4.1.27")
api("com.google.guava:guava:31.1-jre")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
testImplementation("com.google.guava:guava:31.1-jre")
testImplementation("com.lmax:disruptor:3.4.4")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2")
}
it.java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
withSourcesJar()
withJavadocJar()
}
it.tasks {
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
processResources {
filteringCharset = Charsets.UTF_8.name()
}
getByName<Test>("test") {
useJUnitPlatform()
}
}
it.publishing {
publications {
create<MavenPublication>(it.name) {
groupId = "net.drf"
artifactId = it.name
artifact(it.tasks.getByName("sourcesJar")) {
classifier = "sources"
}
artifact(it.tasks.getByName("javadocJar")) {
classifier = "javadoc"
}
artifacts.artifact(it.tasks.jar)
pom {
licenses {
license {
name.set("Mozilla Public License Version 2.0")
url.set("https://mozilla.org/MPL/2.0/")
}
}
}
}
}
}
}