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@4ea67ab [ci skip] Remove trailing comma in projects action PaperMC/Paper@8c058f8 Update paperweight to 1.6.3 (#10626) PaperMC/Paper@fa6013d Fixes beds not exploding in the nether PaperMC/Paper@3e0eb4a Updated Upstream (CraftBukkit) (#10624)
129 lines
3.3 KiB
Kotlin
129 lines
3.3 KiB
Kotlin
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
|
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
|
|
|
plugins {
|
|
java
|
|
`maven-publish`
|
|
id("io.papermc.paperweight.patcher") version "1.6.3"
|
|
}
|
|
|
|
allprojects {
|
|
apply(plugin = "java")
|
|
apply(plugin = "maven-publish")
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(21)
|
|
}
|
|
}
|
|
}
|
|
|
|
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
|
|
|
|
subprojects {
|
|
tasks.withType<JavaCompile>().configureEach {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
options.release = 21
|
|
}
|
|
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)
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven(paperMavenPublicUrl)
|
|
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") // TODO - Adventure snapshot
|
|
maven("https://jitpack.io")
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven(paperMavenPublicUrl) {
|
|
content {
|
|
onlyForConfigurations(configurations.paperclip.name)
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
remapper("net.fabricmc:tiny-remapper:0.10.1:fat")
|
|
decompiler("org.vineflower:vineflower:1.10.1")
|
|
paperclip("io.papermc:paperclip:3.0.3")
|
|
}
|
|
|
|
paperweight {
|
|
serverProject = project(":purpur-server")
|
|
|
|
remapRepo = paperMavenPublicUrl
|
|
decompileRepo = paperMavenPublicUrl
|
|
|
|
usePaperUpstream(providers.gradleProperty("paperCommit")) {
|
|
withPaperPatcher {
|
|
apiPatchDir = layout.projectDirectory.dir("patches/api")
|
|
apiOutputDir = layout.projectDirectory.dir("Purpur-API")
|
|
|
|
serverPatchDir = layout.projectDirectory.dir("patches/server")
|
|
serverOutputDir = layout.projectDirectory.dir("Purpur-Server")
|
|
}
|
|
|
|
patchTasks.register("generatedApi") {
|
|
isBareDirectory = true
|
|
upstreamDirPath = "paper-api-generator/generated"
|
|
patchDir = layout.projectDirectory.dir("patches/generated-api")
|
|
outputDir = layout.projectDirectory.dir("paper-api-generator/generated")
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.generateDevelopmentBundle {
|
|
apiCoordinates = "org.purpurmc.purpur:purpur-api"
|
|
mojangApiCoordinates = "io.papermc.paper:paper-mojangapi"
|
|
libraryRepositories = listOf(
|
|
"https://repo.maven.apache.org/maven2/",
|
|
paperMavenPublicUrl,
|
|
"https://repo.purpurmc.org/snapshots",
|
|
)
|
|
}
|
|
|
|
allprojects {
|
|
publishing {
|
|
repositories {
|
|
maven("https://repo.purpurmc.org/snapshots") {
|
|
name = "purpur"
|
|
credentials(PasswordCredentials::class)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
publications.create<MavenPublication>("devBundle") {
|
|
artifact(tasks.generateDevelopmentBundle) {
|
|
artifactId = "dev-bundle"
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.register("printMinecraftVersion") {
|
|
doLast {
|
|
println(providers.gradleProperty("mcVersion").get().trim())
|
|
}
|
|
}
|
|
|
|
tasks.register("printPurpurVersion") {
|
|
doLast {
|
|
println(project.version)
|
|
}
|
|
}
|