mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-19 14:59:29 +00:00
84 lines
2.3 KiB
Plaintext
84 lines
2.3 KiB
Plaintext
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
|
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
|
|
|
plugins {
|
|
`maven-publish`
|
|
id("io.papermc.paperweight.patcher") version "2.0.0-beta.14"
|
|
}
|
|
|
|
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
|
|
|
|
subprojects {
|
|
apply(plugin = "java-library")
|
|
apply(plugin = "maven-publish")
|
|
|
|
extensions.configure<JavaPluginExtension> {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(21)
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven(paperMavenPublicUrl)
|
|
}
|
|
|
|
tasks.withType<AbstractArchiveTask>().configureEach {
|
|
isPreserveFileTimestamps = false
|
|
isReproducibleFileOrder = true
|
|
}
|
|
tasks.withType<JavaCompile> {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
options.release = 21
|
|
options.isFork = true
|
|
}
|
|
tasks.withType<Javadoc> {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
}
|
|
tasks.withType<ProcessResources> {
|
|
filteringCharset = Charsets.UTF_8.name()
|
|
}
|
|
tasks.withType<Test> {
|
|
testLogging {
|
|
showStackTraces = true
|
|
exceptionFormat = TestExceptionFormat.FULL
|
|
events(TestLogEvent.STANDARD_OUT)
|
|
}
|
|
}
|
|
}
|
|
|
|
paperweight {
|
|
upstreams.paper {
|
|
ref = providers.gradleProperty("paperRef")
|
|
|
|
patchFile {
|
|
path = "paper-server/build.gradle.kts"
|
|
outputFile = file("gale-server/build.gradle.kts") // Gale - build changes
|
|
patchFile = file("gale-server/build.gradle.kts.patch") // Gale - build changes
|
|
}
|
|
patchFile {
|
|
path = "paper-api/build.gradle.kts"
|
|
outputFile = file("gale-api/build.gradle.kts") // Gale - build changes
|
|
patchFile = file("gale-api/build.gradle.kts.patch") // Gale - build changes
|
|
}
|
|
patchDir("paperApi") {
|
|
upstreamPath = "paper-api"
|
|
excludes = setOf("build.gradle.kts")
|
|
patchesDir = file("gale-api/paper-patches") // Gale - build changes
|
|
outputDir = file("paper-api")
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.register("printMinecraftVersion") {
|
|
doLast {
|
|
println(providers.gradleProperty("mcVersion").get().trim())
|
|
}
|
|
}
|
|
|
|
tasks.register("printGaleVersion") { // Gale - branding changes
|
|
doLast {
|
|
println(project.version)
|
|
}
|
|
}
|