9
0
mirror of https://github.com/SparklyPower/SparklyPaper.git synced 2025-12-19 06:59:21 +00:00
Files
SparklyPaperMC/build.gradle.kts
MrPowerGamerBR af3b1442a9 Update to Paper 1.21.5
Not all patches are migrated yet, I'm commiting right now to avoid losing my progress

This time I've moved the patches to file patches instead of feature patches, this DOES NOT include the parallel world ticking patch yet
2025-05-25 20:24:39 -03:00

85 lines
2.6 KiB
Plaintext

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.17"
}
paperweight {
upstreams.paper {
ref = providers.gradleProperty("paperRef")
patchFile {
path = "paper-server/build.gradle.kts"
outputFile = file("sparklypaper-server/build.gradle.kts")
patchFile = file("sparklypaper-server/build.gradle.kts.patch")
}
patchFile {
path = "paper-api/build.gradle.kts"
outputFile = file("sparklypaper-api/build.gradle.kts")
patchFile = file("sparklypaper-api/build.gradle.kts.patch")
}
patchDir("paperApi") {
upstreamPath = "paper-api"
excludes = setOf("build.gradle.kts")
patchesDir = file("sparklypaper-api/paper-patches")
outputDir = file("paper-api")
}
}
}
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)
}
}
extensions.configure<PublishingExtension> {
// Publishing API:
// ./gradlew :sparklypaper-api:publish[ToMavenLocal]
repositories {
maven {
name = "PerfectDreams"
url = uri("https://repo.perfectdreams.net/")
// See Gradle docs for how to provide credentials to PasswordCredentials
// https://docs.gradle.org/current/samples/sample_publishing_credentials.html
credentials(PasswordCredentials::class)
}
}
}
}