-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle.kts
82 lines (70 loc) · 2.38 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
77
78
79
80
81
82
val utf8: String = Charsets.UTF_8.name()
val javaVersion: Int = property("java.version").toString().toInt()
val javaCompilerArgs: String = property("java.compilerArgs").toString()
val projectGroup: String = property("project.group").toString()
val projectVersion: Any = property("project.version")!!
val projectDescription: String = property("project.description").toString()
plugins {
java
alias(libs.plugins.shadow) apply false
alias(libs.plugins.paper.userdev) apply false
alias(libs.plugins.paper.run) apply false
}
subprojects {
apply(plugin = "java")
group = project.group
version = projectVersion
description = projectDescription
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(javaVersion))
}
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.codemc.org/repository/maven-public/")
maven("https://maven.playpro.com")
}
dependencies {
compileOnly(rootProject.libs.fastutil)
compileOnly(rootProject.libs.google.guava)
compileOnly(rootProject.libs.google.gson)
compileOnly(rootProject.libs.google.jsr305)
compileOnly(rootProject.libs.jetbrains.annotations)
compileOnly(rootProject.libs.jackson.annotations)
compileOnly(rootProject.libs.jda)
}
tasks {
compileJava {
options.encoding = utf8
options.release.set(javaVersion)
options.compilerArgs.add(javaCompilerArgs)
}
jar {
archiveBaseName.set("${rootProject.name}-${project.name}")
destinationDirectory.set(file("$rootDir/build"))
}
javadoc {
enabled = false
options.encoding = utf8
setDestinationDir(file("$rootDir/builds/javadoc"))
}
processResources {
filteringCharset = utf8
}
}
}
tasks {
jar {
doLast {
file("build").deleteRecursively()
}
}
compileJava { enabled = false }
processResources { enabled = false }
classes { enabled = false }
assemble { enabled = false }
testClasses { enabled = false }
test { enabled = false }
check { enabled = false }
build { enabled = false }
}