Purpur/build.gradle.kts

112 lines
3.1 KiB
Plaintext
Raw Normal View History

2022-04-06 23:46:13 +08:00
import io.papermc.paperweight.util.constants.PAPERCLIP_CONFIG
plugins {
java
`maven-publish`
2022-01-05 13:14:55 +08:00
id("com.github.johnrengelman.shadow") version "7.1.2" apply false
id("io.papermc.paperweight.patcher") version "1.3.7"
}
2021-06-13 18:23:53 +08:00
repositories {
mavenCentral()
2021-06-15 19:42:35 +08:00
maven("https://papermc.io/repo/repository/maven-public/") {
2021-11-30 20:06:28 +08:00
content {
onlyForConfigurations(PAPERCLIP_CONFIG)
}
2021-06-13 18:23:53 +08:00
}
}
dependencies {
remapper("net.fabricmc:tiny-remapper:0.8.2:fat")
2022-06-08 02:53:59 +08:00
decompiler("net.minecraftforge:forgeflower:1.5.605.7")
paperclip("io.papermc:paperclip:3.0.2")
2021-06-13 18:23:53 +08:00
}
2021-11-30 07:04:05 +08:00
allprojects {
apply(plugin = "java")
2021-06-22 10:32:05 +08:00
apply(plugin = "maven-publish")
java {
toolchain {
2021-11-24 05:37:40 +08:00
languageVersion.set(JavaLanguageVersion.of(17))
}
}
2021-11-30 07:04:05 +08:00
}
2021-11-30 07:04:05 +08:00
subprojects {
tasks.withType<JavaCompile>().configureEach {
2021-11-30 07:04:05 +08:00
options.encoding = Charsets.UTF_8.name()
2021-11-24 05:37:40 +08:00
options.release.set(17)
}
2021-11-30 07:04:05 +08:00
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/")
2021-06-13 07:42:41 +08:00
maven("https://oss.sonatype.org/content/repositories/snapshots/")
2022-01-05 13:14:55 +08:00
maven("https://jitpack.io")
}
}
paperweight {
2021-11-30 07:04:05 +08:00
serverProject.set(project(":purpur-server"))
remapRepo.set("https://maven.fabricmc.net/")
decompileRepo.set("https://files.minecraftforge.net/maven/")
2021-06-13 22:26:34 +08:00
usePaperUpstream(providers.gradleProperty("paperCommit")) {
2021-06-13 18:58:48 +08:00
withPaperPatcher {
apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
apiOutputDir.set(layout.projectDirectory.dir("Purpur-API"))
serverPatchDir.set(layout.projectDirectory.dir("patches/server"))
serverOutputDir.set(layout.projectDirectory.dir("Purpur-Server"))
}
}
}
2021-11-30 07:04:05 +08:00
2022-01-28 00:30:14 +08:00
tasks.generateDevelopmentBundle {
apiCoordinates.set("org.purpurmc.purpur:purpur-api")
mojangApiCoordinates.set("io.papermc.paper:paper-mojangapi")
libraryRepositories.set(
listOf(
"https://repo.maven.apache.org/maven2/",
"https://libraries.minecraft.net/",
"https://papermc.io/repo/repository/maven-public/",
"https://maven.quiltmc.org/repository/release/",
2022-04-06 23:46:13 +08:00
"https://repo.purpurmc.org/snapshots",
2022-01-28 00:30:14 +08:00
)
)
}
2021-11-30 07:04:05 +08:00
allprojects {
publishing {
repositories {
maven("https://repo.purpurmc.org/snapshots") {
name = "purpur"
credentials(PasswordCredentials::class)
}
}
}
}
2022-01-28 00:30:14 +08:00
publishing {
publications.create<MavenPublication>("devBundle") {
artifact(tasks.generateDevelopmentBundle) {
artifactId = "dev-bundle"
}
}
}