mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
88 lines
2.5 KiB
Plaintext
88 lines
2.5 KiB
Plaintext
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
|
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
|
|
|
plugins {
|
|
java
|
|
id("io.papermc.paperweight.patcher") version "2.0.0-beta.14"
|
|
}
|
|
|
|
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
|
|
|
|
paperweight {
|
|
upstreams.register("purpur") {
|
|
repo = github("PurpurMC", "Purpur")
|
|
ref = providers.gradleProperty("purpurRef")
|
|
|
|
patchFile {
|
|
path = "purpur-server/build.gradle.kts"
|
|
outputFile = file("divinemc-server/build.gradle.kts")
|
|
patchFile = file("divinemc-server/build.gradle.kts.patch")
|
|
}
|
|
patchFile {
|
|
path = "purpur-api/build.gradle.kts"
|
|
outputFile = file("divinemc-api/build.gradle.kts")
|
|
patchFile = file("divinemc-api/build.gradle.kts.patch")
|
|
}
|
|
patchRepo("paperApi") {
|
|
upstreamPath = "paper-api"
|
|
patchesDir = file("divinemc-api/paper-patches")
|
|
outputDir = file("paper-api")
|
|
}
|
|
patchDir("purpurApi") {
|
|
upstreamPath = "purpur-api"
|
|
excludes = listOf("build.gradle.kts", "build.gradle.kts.patch", "paper-patches")
|
|
patchesDir = file("divinemc-api/purpur-patches")
|
|
outputDir = file("purpur-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
|
|
}
|
|
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.bxteam.org/snapshots") {
|
|
name = "divinemc"
|
|
credentials(PasswordCredentials::class)
|
|
}
|
|
}
|
|
}
|
|
}
|