mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
78 lines
2.2 KiB
Plaintext
78 lines
2.2 KiB
Plaintext
import io.papermc.paperweight.patcher.tasks.SimpleRebuildGitPatches
|
|
import io.papermc.paperweight.util.constants.*
|
|
|
|
plugins {
|
|
java
|
|
id("com.github.johnrengelman.shadow") version "7.0.0" apply false
|
|
id("io.papermc.paperweight.patcher") version "1.1.9"
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven("https://papermc.io/repo/repository/maven-public/") {
|
|
content { onlyForConfigurations(PAPERCLIP_CONFIG) }
|
|
}
|
|
maven("https://maven.quiltmc.org/repository/release/") {
|
|
content { onlyForConfigurations(REMAPPER_CONFIG) }
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
remapper("org.quiltmc:tiny-remapper:0.4.1")
|
|
paperclip("io.papermc:paperclip:2.0.1")
|
|
}
|
|
|
|
subprojects {
|
|
apply(plugin = "java")
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion.set(JavaLanguageVersion.of(16))
|
|
}
|
|
}
|
|
|
|
tasks.withType<JavaCompile> {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
options.release.set(16)
|
|
}
|
|
tasks.withType<Javadoc> {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
}
|
|
tasks.withType<ProcessResources> {
|
|
filteringCharset = Charsets.UTF_8.name()
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven("https://oss.sonatype.org/content/groups/public/")
|
|
maven("https://papermc.io/repo/repository/maven-public/")
|
|
maven("https://ci.emc.gs/nexus/content/groups/aikar/")
|
|
maven("https://repo.aikar.co/content/groups/aikar")
|
|
maven("https://repo.md-5.net/content/repositories/releases/")
|
|
maven("https://hub.spigotmc.org/nexus/content/groups/public/")
|
|
}
|
|
}
|
|
|
|
paperweight {
|
|
serverProject.set(project(":Leaves-Server"))
|
|
|
|
usePaperUpstream(provider { file("current-paper").readText().trim() }) {
|
|
withPaperPatcher {
|
|
apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
|
|
apiOutputDir.set(layout.projectDirectory.dir("Leaves-API"))
|
|
|
|
serverPatchDir.set(layout.projectDirectory.dir("patches/server"))
|
|
serverOutputDir.set(layout.projectDirectory.dir("Leaves-Server"))
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.paperclipJar {
|
|
destinationDirectory.set(rootProject.layout.projectDirectory)
|
|
archiveFileName.set("leaves-paperclip.jar")
|
|
}
|
|
|
|
tasks.withType<SimpleRebuildGitPatches> {
|
|
filterPatches.set(false)
|
|
}
|