mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@a4feb288 Update to 1.21.8 PaperMC/Paper@6db4bc01 1.21.8 generators PaperMC/Paper@d8cb3f58 Update DataConverter to 1.21.8-RC1 PaperMC/Paper@1f93f566 [ci/skip] Improve getPotentialBedLocation deprecation (#12857) PaperMC/Paper@6fb36e34 Replace compileOnly with implementation for test visibility (#12841) PaperMC/Paper@aa4ef067 Update DataConverter constants for 1.21.8
95 lines
2.6 KiB
Kotlin
95 lines
2.6 KiB
Kotlin
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
|
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
|
|
|
plugins {
|
|
java // TODO java launcher tasks
|
|
id("io.papermc.paperweight.patcher") version "2.0.0-beta.18"
|
|
}
|
|
|
|
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
|
|
|
|
paperweight {
|
|
upstreams.paper {
|
|
ref = providers.gradleProperty("paperCommit")
|
|
|
|
patchFile {
|
|
path = "paper-server/build.gradle.kts"
|
|
outputFile = file("purpur-server/build.gradle.kts")
|
|
patchFile = file("purpur-server/build.gradle.kts.patch")
|
|
}
|
|
patchFile {
|
|
path = "paper-api/build.gradle.kts"
|
|
outputFile = file("purpur-api/build.gradle.kts")
|
|
patchFile = file("purpur-api/build.gradle.kts.patch")
|
|
}
|
|
patchDir("paperApi") {
|
|
upstreamPath = "paper-api"
|
|
excludes = setOf("build.gradle.kts")
|
|
patchesDir = file("purpur-api/paper-patches")
|
|
outputDir = file("paper-api")
|
|
}
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
apply(plugin = "java-library")
|
|
apply(plugin = "maven-publish")
|
|
|
|
extensions.configure<JavaPluginExtension> {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(21)
|
|
}
|
|
}
|
|
|
|
tasks.withType<JavaCompile> {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
options.release = 21
|
|
options.isFork = true
|
|
options.compilerArgs.addAll(listOf("-Xlint:-deprecation", "-Xlint:-removal"))
|
|
}
|
|
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)
|
|
}
|
|
}
|
|
tasks.withType<AbstractArchiveTask>().configureEach {
|
|
isPreserveFileTimestamps = false
|
|
isReproducibleFileOrder = true
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven(paperMavenPublicUrl)
|
|
maven("https://jitpack.io")
|
|
}
|
|
|
|
extensions.configure<PublishingExtension> {
|
|
repositories {
|
|
maven("https://repo.purpurmc.org/snapshots") {
|
|
name = "purpur"
|
|
credentials(PasswordCredentials::class)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.register("printMinecraftVersion") {
|
|
doLast {
|
|
println(providers.gradleProperty("mcVersion").get().trim())
|
|
}
|
|
}
|
|
|
|
tasks.register("printPurpurVersion") {
|
|
doLast {
|
|
println(project.version)
|
|
}
|
|
}
|