jmp's test plugin for paperweight-userdev
development
(also serves as an example until more thorough documentation is created)
build.gradle.kts
andsettings.gradle.kts
both contain important configuration.paperweight-userdev
automatically detects shadow and will useshadowJar
as input forreobfJar
. This means no extra configuration is required to usepaperweight-userdev
with shadow. See theshadow
branch on this repository for an example usage of shadow withpaperweight-userdev
.- The
run-paper
Gradle plugin is optional, it integrates with paperweight and allows for launching a test server with your plugin through therunServer
andrunMojangMappedServer
tasks. - Due to a gradle bug, independently applying
paperweight-userdev
to multiple projects in a build can result in errors. To work around this, applypaperweight-userdev
to the root project withapply false
(i.e.,id("...") version "..." apply false
in Kotlin DSL), and then when applyingpaperweight-userdev
to subprojects don't include a version specification. A more advanced solution would involve addingpaperweight-userdev
as a dependency to your build logic, seereflection-remapper
and thesource-remap
branch on this repo for examples of this. - The
source-remap
branch on this repo has a specialremapPluginSources
task to remap the source code insrc/main/java
from spigot to Mojang mappings, outputting remapped source in/src/main/mojangMappedJava
. Note that this will only remap your code, not update it from a prior version. Meaning you must be using the dev bundle for the Minecraft version your source code is for when remapping. paperweight-userdev
doesn't provide any utilities for doing reflection.reflection-remapper
is a companion library topaperweight-userdev
assisting with reflection on remapped code.