AxiomPaperPlugin/build.gradle.kts

60 Zeilen
2.0 KiB
Plaintext

2021-07-09 04:57:49 +02:00
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
2021-07-08 14:30:01 +02:00
plugins {
`java-library`
2023-03-15 21:08:58 +01:00
id("io.papermc.paperweight.userdev") version "1.5.3"
2022-12-13 19:18:29 +01:00
id("xyz.jpenilla.run-paper") version "2.0.1" // Adds runServer and runMojangMappedServer tasks for testing
2023-02-24 21:14:46 +01:00
id("net.minecrell.plugin-yml.bukkit") version "0.5.3" // Generates plugin.yml
2021-07-08 14:30:01 +02:00
}
group = "io.papermc.paperweight"
version = "1.0.0-SNAPSHOT"
2021-08-17 23:37:14 +02:00
description = "Test plugin for paperweight-userdev"
2021-07-08 14:30:01 +02:00
2021-11-18 01:55:32 +01:00
java {
2021-12-06 02:01:56 +01:00
// Configure the java toolchain. This allows gradle to auto-provision JDK 17 on systems that only have JDK 8 installed for example.
2021-11-18 01:55:32 +01:00
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
2021-07-08 14:30:01 +02:00
dependencies {
2023-03-15 21:08:58 +01:00
paperweight.paperDevBundle("1.19.4-R0.1-SNAPSHOT")
// paperweight.devBundle("com.example.paperfork", "1.19.4-R0.1-SNAPSHOT")
2021-07-08 14:30:01 +02:00
}
tasks {
2021-12-06 02:01:56 +01:00
// Configure reobfJar to run when invoking the build task
2021-12-23 02:04:48 +01:00
assemble {
2021-07-09 04:57:49 +02:00
dependsOn(reobfJar)
}
2021-07-08 14:30:01 +02:00
compileJava {
2021-12-06 02:01:56 +01:00
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
// Set the release flag. This configures what version bytecode the compiler will emit, as well as what JDK APIs are usable.
// See https://openjdk.java.net/jeps/247 for more information.
2021-12-01 10:48:52 +01:00
options.release.set(17)
2021-07-08 14:30:01 +02:00
}
2021-07-09 04:57:49 +02:00
javadoc {
2021-12-06 02:01:56 +01:00
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
2021-07-09 04:57:49 +02:00
}
processResources {
2021-12-06 02:01:56 +01:00
filteringCharset = Charsets.UTF_8.name() // We want UTF-8 for everything
}
/*
reobfJar {
// This is an example of how you might change the output location for reobfJar. It's recommended not to do this
// for a variety of reasons, however it's asked frequently enough that an example of how to do it is included here.
outputJar.set(layout.buildDirectory.file("libs/PaperweightTestPlugin-${project.version}.jar"))
2021-07-08 14:30:01 +02:00
}
2021-12-06 02:01:56 +01:00
*/
2021-07-08 14:30:01 +02:00
}
2021-12-06 02:01:56 +01:00
// Configure plugin.yml generation
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"
2022-08-07 22:49:16 +02:00
apiVersion = "1.19"
2021-07-08 14:30:01 +02:00
authors = listOf("Author")
}