import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.api.tasks.testing.logging.TestLogEvent plugins { java // TODO java launcher tasks id("moe.luminolmc.hyacinthusweight.patcher") } paperweight { filterPatches = false upstreams.register("folia") { repo = github("PaperMC", "Folia") ref = providers.gradleProperty("foliaRef") patchFile { path = "folia-server/build.gradle.kts" outputFile = file("camellia-server/build.gradle.kts") patchFile = file("camellia-server/build.gradle.kts.patch") } patchFile { path = "folia-api/build.gradle.kts" outputFile = file("camellia-api/build.gradle.kts") patchFile = file("camellia-api/build.gradle.kts.patch") } patchRepo("paperApi") { upstreamPath = "paper-api" patchesDir = file("camellia-api/paper-patches") outputDir = file("paper-api") } patchDir("foliaApi") { upstreamPath = "folia-api" excludes = listOf("build.gradle.kts", "build.gradle.kts.patch", "paper-patches") patchesDir = file("camellia-api/folia-patches") outputDir = file("folia-api") } } } val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/" val bacteriawaMavenPublicUrl = "https://repo.bacteriawa.com/repository/maven-public/"; subprojects { apply(plugin = "java-library") apply(plugin = "maven-publish") extensions.configure { toolchain { languageVersion = JavaLanguageVersion.of(25) } } repositories { mavenCentral() maven(paperMavenPublicUrl) maven(bacteriawaMavenPublicUrl) } dependencies { "testRuntimeOnly"("org.junit.platform:junit-platform-launcher") } tasks.withType().configureEach { isPreserveFileTimestamps = false isReproducibleFileOrder = true } tasks.withType().configureEach { options.encoding = Charsets.UTF_8.name() options.release = 25 options.isFork = true } tasks.withType().configureEach { options.encoding = Charsets.UTF_8.name() } tasks.withType().configureEach { filteringCharset = Charsets.UTF_8.name() } tasks.withType { testLogging { showStackTraces = true exceptionFormat = TestExceptionFormat.FULL events(TestLogEvent.STANDARD_OUT) } } extensions.configure { repositories { maven("https://repo.bacteriawa.com/repository/maven-releases/") { name = "Bacteriawa" credentials(PasswordCredentials::class) { username = System.getenv("MAVEN_REPO_USERNAME") password = System.getenv("MAVEN_REPO_PASSWORD") } } } } tasks.withType().configureEach { options { (this as StandardJavadocDocletOptions).apply { addStringOption("-add-modules", "jdk.incubator.vector") addStringOption("Xdoclint:none", "-quiet") } } } }