• Stars
    star
    181
  • Rank 212,110 (Top 5 %)
  • Language
    Kotlin
  • Created about 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Gradle build system plugin for Paper and Paper forks

paperweight

paperweight consists of three Gradle plugins:

  • paperweight-core: Used to build Paper
  • paperweight-patcher: Used to create forks of Paper or other paperweight-patcher-based forks
  • paperweight-userdev: Used to develop internals plugins using Mojang mappings

How to use this for testing:

  • Install paperweight to Maven Local:
./gradlew publishToMavenLocal
  • Add mavenLocal() for plugin resolution in your test project (see the Gradle docs for more details)
  • Adjust the paperweight version in your test project
    • Local versions of paperweight will use have the -SNAPSHOT suffix in the version from gradle.properties replaced by -LOCAL-SNAPSHOT

Most output paperweight creates goes into <project-root>/.gradle/caches/paperweight

Debugging

Create a remote JVM debug run configuration in IntelliJ which connects to port 5005, then run Gradle in debug mode:

./gradlew --no-daemon -Dorg.gradle.debug=true <task>

Gradle will not start until the debugger is connected so you don't need to worry about missing a breakpoint.

Style Guide

This projects follows the opinionated ktlint linter and formatter. It uses the ktlint-gradle plugin to automatically check and format the code in this repo.

Run the format task to automatically reformat the project using ktlint - which should handle most cases - to maintain a consistent code style. Adjust any errors ktlint can't fix itself before committing.

./gradlew format

IDE Setup

It's recommended to run the ktlintApplyToIdea and addKtlintFormatGitPreCommitHook tasks to configure your IDE with ktlint style settings and to automatically format this project's code before committing:

./gradlew ktlintApplyToIdea addKtlintFormatGitPreCommitHook

This project uses many new Gradle features to make sure we're ready for Gradle 7.0 and beyond, and we don't find ourselves stuck in a bad position where it's too hard for us to update. That being said, Gradle always marks new APIs as unstable for a bit until the next major version, so you should probably disable the "Unstable API Usages" inspection in IntelliJ as well. The easiest way to do this is just find any place where an "unstable API" is used (tons in Paperweight.kt) and disable the inspection from there.

More Repositories

1

Paper

The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies
Java
7,858
star
2

Folia

Fork of Paper which adds regionised multithreading to the dedicated server.
Batchfile
3,387
star
3

Velocity

The modern, next-generation Minecraft server proxy.
Java
1,379
star
4

Starlight

Rewrites the light engine to fix lighting performance and lighting errors
Java
1,268
star
5

Waterfall

BungeeCord fork that aims to improve performance and stability.
Shell
721
star
6

PaperLib

Plugin Library for interfacing with Paper Specific API's with graceful fallback that maintains Spigot Compatibility, such as Async Chunk Loading.
Java
248
star
7

Travertine

Waterfall with 1.7 support
Shell
137
star
8

papermc.io

The PaperMC Website
SCSS
125
star
9

Paperclip

Bootstrap utility and launcher for the Paper Minecraft server
Java
113
star
10

paperweight-test-plugin

test plugin for paperweight-userdev
Java
71
star
11

DataConverter

Rewrite of the dataconverter system for performance.
Java
56
star
12

paperd

Wrapper which allows running the PaperMC Minecraft server as a proper daemon
Rust
53
star
13

website

The PaperMC website
TypeScript
48
star
14

PaperDocs

Documentation for all projects under the PaperMC umbrella
Python
47
star
15

paperweight-examples

Kotlin
45
star
16

Paper-1.7

Shell
45
star
17

mache

Compilable patches for the decompiled Minecraft server
32
star
18

docs

Documentation for all projects under the PaperMC umbrella.
TypeScript
29
star
19

bibliothek

The PaperMC downloads API.
Java
25
star
20

SectorTool

Java
22
star
21

asm-utils

Library for redirecting Java bytecode & reflection calls using ASM
Java
8
star
22

PaperTestServer

Skeleton for test server setup to test Paper
5
star
23

velocitypowered.com

The revamped Velocity website built on Gatsby
JavaScript
5
star
24

item-converter

REST API for upgrading Minecraft commands and command arguments from 1.20.4 to 1.20.6
Java
4
star
25

update-projects-action

TypeScript
4
star
26

.github

2
star
27

Parchment

PHP
2
star
28

paper-trail

Helpers for notifying users of legacy server software that a plugin requires Paper
Java
2
star
29

PaperclipMavenPlugin

Generates the patch and settings file for Paperclip
Java
2
star
30

deprecated-bungeechat

Kotlin
2
star
31

patched-spigot-fernflower

Kotlin
2
star
32

multi-version-catalog

Combines multiple toml files into a single version catalog
Kotlin
2
star
33

docs-previews

Automatically generated previews for pull requests against PaperMC/docs
HTML
1
star
34

restamp

Apply access transformers to closed/forked source files
Java
1
star