mirror of
https://github.com/PaperMC/Folia.git
synced 2024-11-24 12:25:23 +01:00
de6a87e338
- Compile needs to be checked. - Behaviors around the new tick manager need to be designed and implemented. Chk update.txt for anything specific.
116 lines
2.8 KiB
Plaintext
116 lines
2.8 KiB
Plaintext
import io.papermc.paperweight.tasks.RebuildGitPatches
|
|
|
|
plugins {
|
|
java
|
|
`maven-publish`
|
|
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
|
id("io.papermc.paperweight.patcher") version "1.5.11"
|
|
}
|
|
|
|
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven(paperMavenPublicUrl) {
|
|
content { onlyForConfigurations(configurations.paperclip.name) }
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
remapper("net.fabricmc:tiny-remapper:0.8.10:fat")
|
|
decompiler("net.minecraftforge:forgeflower:2.0.627.2")
|
|
paperclip("io.papermc:paperclip:3.0.3")
|
|
}
|
|
|
|
allprojects {
|
|
apply(plugin = "java")
|
|
apply(plugin = "maven-publish")
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion.set(JavaLanguageVersion.of(17))
|
|
}
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
tasks.withType<JavaCompile> {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
options.release.set(17)
|
|
}
|
|
tasks.withType<Javadoc> {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
}
|
|
tasks.withType<ProcessResources> {
|
|
filteringCharset = Charsets.UTF_8.name()
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven(paperMavenPublicUrl)
|
|
}
|
|
}
|
|
|
|
paperweight {
|
|
serverProject.set(project(":folia-server"))
|
|
|
|
remapRepo.set(paperMavenPublicUrl)
|
|
decompileRepo.set(paperMavenPublicUrl)
|
|
|
|
usePaperUpstream(providers.gradleProperty("paperRef")) {
|
|
withPaperPatcher {
|
|
apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
|
|
apiOutputDir.set(layout.projectDirectory.dir("Folia-API"))
|
|
|
|
serverPatchDir.set(layout.projectDirectory.dir("patches/server"))
|
|
serverOutputDir.set(layout.projectDirectory.dir("Folia-Server"))
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.generateDevelopmentBundle {
|
|
apiCoordinates.set("dev.folia:folia-api")
|
|
mojangApiCoordinates.set("io.papermc.paper:paper-mojangapi")
|
|
libraryRepositories.addAll(
|
|
"https://repo.maven.apache.org/maven2/",
|
|
paperMavenPublicUrl,
|
|
)
|
|
}
|
|
|
|
allprojects {
|
|
publishing {
|
|
repositories {
|
|
maven("https://repo.papermc.io/repository/maven-snapshots/") {
|
|
name = "paperSnapshots"
|
|
credentials(PasswordCredentials::class)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
if (project.hasProperty("publishDevBundle")) {
|
|
publications.create<MavenPublication>("devBundle") {
|
|
artifact(tasks.generateDevelopmentBundle) {
|
|
artifactId = "dev-bundle"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.withType<RebuildGitPatches> {
|
|
filterPatches.set(false)
|
|
}
|
|
|
|
tasks.register("printMinecraftVersion") {
|
|
doLast {
|
|
println(providers.gradleProperty("mcVersion").get().trim())
|
|
}
|
|
}
|
|
|
|
tasks.register("printPaperVersion") {
|
|
doLast {
|
|
println(project.version)
|
|
}
|
|
}
|