69 lines
2.1 KiB
Kotlin
69 lines
2.1 KiB
Kotlin
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.24"
|
|
}
|
|
|
|
val paperRepository = "https://repo.papermc.io/repository/maven-public/"
|
|
|
|
subprojects {
|
|
apply(plugin = "java-library")
|
|
apply(plugin = "maven-publish")
|
|
|
|
extensions.configure<JavaPluginExtension> {
|
|
toolchain.languageVersion = JavaLanguageVersion.of(25)
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven(paperRepository)
|
|
}
|
|
|
|
tasks.withType<JavaCompile>().configureEach {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
options.release = 25
|
|
options.isFork = true
|
|
options.compilerArgs.addAll(listOf("-Xlint:-deprecation", "-Xlint:-removal"))
|
|
}
|
|
tasks.withType<Javadoc>().configureEach {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
}
|
|
tasks.withType<ProcessResources>().configureEach {
|
|
filteringCharset = Charsets.UTF_8.name()
|
|
}
|
|
tasks.withType<Test>().configureEach {
|
|
testLogging {
|
|
showStackTraces = true
|
|
exceptionFormat = TestExceptionFormat.FULL
|
|
events(TestLogEvent.STANDARD_OUT)
|
|
}
|
|
}
|
|
}
|
|
|
|
paperweight {
|
|
upstreams.paper {
|
|
repo = providers.gradleProperty("paperRepository")
|
|
.orElse("https://github.com/PaperMC/Paper.git")
|
|
ref = providers.gradleProperty("paperCommit")
|
|
|
|
patchFile {
|
|
path = "paper-api/build.gradle.kts"
|
|
outputFile = file("infstar-api/build.gradle.kts")
|
|
patchFile = file("infstar-api/build.gradle.kts.patch")
|
|
}
|
|
patchFile {
|
|
path = "paper-server/build.gradle.kts"
|
|
outputFile = file("infstar-server/build.gradle.kts")
|
|
patchFile = file("infstar-server/build.gradle.kts.patch")
|
|
}
|
|
patchDir("paperApi") {
|
|
upstreamPath = "paper-api"
|
|
excludes = setOf("build.gradle.kts")
|
|
patchesDir = file("infstar-api/paper-patches")
|
|
outputDir = file("paper-api")
|
|
}
|
|
}
|
|
}
|