2021-07-09 04:57:49 +02:00
|
|
|
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
|
2021-07-08 14:55:47 +02:00
|
|
|
import xyz.jpenilla.runpaper.task.RunServerTask
|
2021-07-08 14:30:01 +02:00
|
|
|
|
|
|
|
plugins {
|
|
|
|
`java-library`
|
|
|
|
id("io.papermc.paperweight.userdev") version "1.1.9-LOCAL-SNAPSHOT"
|
2021-07-09 04:57:49 +02:00
|
|
|
id("xyz.jpenilla.run-paper") version "1.0.3"
|
|
|
|
id("net.minecrell.plugin-yml.bukkit") version "0.4.0"
|
2021-07-08 14:30:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
group = "io.papermc.paperweight"
|
|
|
|
version = "1.0.0-SNAPSHOT"
|
|
|
|
|
|
|
|
repositories {
|
2021-07-09 04:57:49 +02:00
|
|
|
mavenLocal() {
|
|
|
|
content { includeGroup("io.papermc.paper") }
|
|
|
|
}
|
2021-07-08 14:30:01 +02:00
|
|
|
mavenCentral()
|
|
|
|
maven("https://papermc.io/repo/repository/maven-public/")
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2021-07-09 04:57:49 +02:00
|
|
|
paperweightDevBundle("1.17.1-R0.1-SNAPSHOT")
|
2021-07-08 14:30:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
runPaper {
|
|
|
|
disablePluginJarDetection()
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks {
|
2021-07-09 04:57:49 +02:00
|
|
|
// Run reobfJar on build
|
|
|
|
build {
|
|
|
|
dependsOn(reobfJar)
|
|
|
|
}
|
|
|
|
|
2021-07-08 14:30:01 +02:00
|
|
|
compileJava {
|
|
|
|
options.encoding = Charsets.UTF_8.name()
|
|
|
|
options.release.set(16)
|
|
|
|
}
|
2021-07-09 04:57:49 +02:00
|
|
|
javadoc {
|
|
|
|
options.encoding = Charsets.UTF_8.name()
|
|
|
|
}
|
|
|
|
processResources {
|
|
|
|
filteringCharset = Charsets.UTF_8.name()
|
2021-07-08 14:30:01 +02:00
|
|
|
}
|
|
|
|
|
2021-07-09 04:57:49 +02:00
|
|
|
// Task to run obfuscated/production server and plugin
|
2021-07-08 14:30:01 +02:00
|
|
|
runServer {
|
|
|
|
minecraftVersion("1.17.1")
|
|
|
|
pluginJars.from(reobfJar.flatMap { it.outputJar })
|
|
|
|
}
|
2021-07-09 04:57:49 +02:00
|
|
|
|
|
|
|
// Task to run mojang mapped/dev server and plugin
|
2021-07-08 14:55:47 +02:00
|
|
|
register<RunServerTask>("runMojangMappedServer") {
|
|
|
|
minecraftVersion("1.17.1")
|
|
|
|
pluginJars.from(jar.flatMap { it.archiveFile })
|
|
|
|
paperclip(layout.file(configurations.mojangMappedServer.map { it.singleFile }))
|
|
|
|
}
|
2021-07-08 14:30:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
bukkit {
|
2021-07-09 04:57:49 +02:00
|
|
|
load = BukkitPluginDescription.PluginLoadOrder.STARTUP
|
2021-07-08 14:30:01 +02:00
|
|
|
main = "io.papermc.paperweight.testplugin.TestPlugin"
|
|
|
|
apiVersion = "1.17"
|
|
|
|
authors = listOf("Author")
|
|
|
|
}
|