2021-06-11 09:45:34 +02:00
|
|
|
plugins {
|
|
|
|
java
|
2021-08-18 00:11:04 +02:00
|
|
|
`maven-publish`
|
2021-10-11 23:31:53 +02:00
|
|
|
id("com.github.johnrengelman.shadow") version "7.1.0" apply false
|
2021-11-17 06:00:14 +01:00
|
|
|
id("io.papermc.paperweight.core") version "1.2.0"
|
2021-06-11 09:45:34 +02:00
|
|
|
}
|
|
|
|
|
2021-08-01 09:55:02 +02:00
|
|
|
allprojects {
|
2021-06-11 09:45:34 +02:00
|
|
|
apply(plugin = "java")
|
2021-08-18 00:11:04 +02:00
|
|
|
apply(plugin = "maven-publish")
|
2021-06-11 09:45:34 +02:00
|
|
|
|
|
|
|
java {
|
|
|
|
toolchain {
|
2021-06-11 13:23:18 +02:00
|
|
|
languageVersion.set(JavaLanguageVersion.of(16))
|
2021-06-11 09:45:34 +02:00
|
|
|
}
|
|
|
|
}
|
2021-08-01 09:55:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
subprojects {
|
2021-06-21 17:27:46 +02:00
|
|
|
tasks.withType<JavaCompile> {
|
|
|
|
options.encoding = Charsets.UTF_8.name()
|
2021-06-11 09:45:34 +02:00
|
|
|
options.release.set(16)
|
|
|
|
}
|
2021-06-21 17:27:46 +02:00
|
|
|
tasks.withType<Javadoc> {
|
|
|
|
options.encoding = Charsets.UTF_8.name()
|
|
|
|
}
|
|
|
|
tasks.withType<ProcessResources> {
|
|
|
|
filteringCharset = Charsets.UTF_8.name()
|
|
|
|
}
|
2021-06-11 09:45:34 +02:00
|
|
|
|
|
|
|
if (name == "Paper-MojangAPI") {
|
|
|
|
return@subprojects
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
maven("https://papermc.io/repo/repository/maven-public/")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
2021-06-13 05:18:50 +02:00
|
|
|
mavenCentral()
|
2021-06-15 06:17:16 +02:00
|
|
|
maven("https://papermc.io/repo/repository/maven-public/") {
|
2021-11-04 03:42:18 +01:00
|
|
|
content { onlyForConfigurations("paperclip") }
|
2021-06-11 09:45:34 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2021-07-07 08:52:40 +02:00
|
|
|
paramMappings("org.quiltmc:yarn:1.17.1+build.1:mergedv2")
|
2021-10-03 03:42:30 +02:00
|
|
|
remapper("net.fabricmc:tiny-remapper:0.6.0:fat")
|
2021-06-15 06:17:16 +02:00
|
|
|
decompiler("net.minecraftforge:forgeflower:1.5.498.12")
|
2021-06-20 07:10:23 +02:00
|
|
|
paperclip("io.papermc:paperclip:2.0.1")
|
2021-06-11 09:45:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
paperweight {
|
2021-06-15 06:17:16 +02:00
|
|
|
minecraftVersion.set(providers.gradleProperty("mcVersion"))
|
2021-06-11 09:45:34 +02:00
|
|
|
serverProject.set(project(":Paper-Server"))
|
|
|
|
|
2021-11-05 01:23:06 +01:00
|
|
|
paramMappingsRepo.set("https://maven.quiltmc.org/repository/release/")
|
|
|
|
remapRepo.set("https://maven.fabricmc.net/")
|
|
|
|
decompileRepo.set("https://files.minecraftforge.net/maven/")
|
|
|
|
|
2021-06-11 09:45:34 +02:00
|
|
|
paper {
|
2021-06-20 09:47:14 +02:00
|
|
|
spigotApiPatchDir.set(layout.projectDirectory.dir("patches/api"))
|
|
|
|
spigotServerPatchDir.set(layout.projectDirectory.dir("patches/server"))
|
2021-06-11 14:02:28 +02:00
|
|
|
|
2021-06-20 09:47:14 +02:00
|
|
|
mappingsPatch.set(layout.projectDirectory.file("build-data/mappings-patch.tiny"))
|
|
|
|
reobfMappingsPatch.set(layout.projectDirectory.file("build-data/reobf-mappings-patch.tiny"))
|
2021-06-11 09:45:34 +02:00
|
|
|
|
2021-06-20 09:47:14 +02:00
|
|
|
additionalSpigotMemberMappings.set(layout.projectDirectory.file("build-data/additional-spigot-member-mappings.csrg"))
|
|
|
|
craftBukkitPatchPatchesDir.set(layout.projectDirectory.dir("build-data/craftbukkit-patch-patches"))
|
2021-06-27 05:11:45 +02:00
|
|
|
|
|
|
|
reobfPackagesToFix.addAll(
|
|
|
|
"co.aikar.timings",
|
|
|
|
"com.destroystokyo.paper",
|
|
|
|
"com.mojang",
|
|
|
|
"io.papermc.paper",
|
|
|
|
"net.kyori.adventure.bossbar",
|
|
|
|
"net.minecraft",
|
|
|
|
"org.bukkit.craftbukkit",
|
|
|
|
"org.spigotmc"
|
|
|
|
)
|
2021-06-11 09:45:34 +02:00
|
|
|
}
|
|
|
|
}
|
2021-06-19 01:38:26 +02:00
|
|
|
|
2021-08-18 00:11:04 +02:00
|
|
|
tasks.generateDevelopmentBundle {
|
|
|
|
apiCoordinates.set("io.papermc.paper:paper-api")
|
|
|
|
mojangApiCoordinates.set("io.papermc.paper:paper-mojangapi")
|
2021-11-05 01:23:06 +01:00
|
|
|
libraryRepositories.addAll(
|
|
|
|
"https://repo.maven.apache.org/maven2/",
|
|
|
|
"https://libraries.minecraft.net/",
|
|
|
|
"https://papermc.io/repo/repository/maven-public/",
|
2021-08-18 00:11:04 +02:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
publishing {
|
2021-11-05 01:23:06 +01:00
|
|
|
if (project.providers.gradleProperty("publishDevBundle").forUseAtConfigurationTime().isPresent) {
|
2021-08-18 00:11:04 +02:00
|
|
|
publications.create<MavenPublication>("devBundle") {
|
|
|
|
artifact(tasks.generateDevelopmentBundle) {
|
|
|
|
artifactId = "dev-bundle"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
publishing {
|
|
|
|
repositories {
|
2021-11-05 01:23:06 +01:00
|
|
|
maven("https://papermc.io/repo/repository/maven-snapshots/") {
|
2021-08-18 00:11:04 +02:00
|
|
|
name = "paperSnapshots"
|
|
|
|
credentials(PasswordCredentials::class)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-19 01:38:26 +02:00
|
|
|
tasks.register("printMinecraftVersion") {
|
|
|
|
doLast {
|
2021-06-20 09:47:14 +02:00
|
|
|
println(providers.gradleProperty("mcVersion").get().trim())
|
2021-06-19 01:38:26 +02:00
|
|
|
}
|
|
|
|
}
|