Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 9 additions & 16 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ jobs:
with:
java-version: "25"
distribution: "temurin"
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
- name: Build JAR with Gradle
Expand Down Expand Up @@ -82,10 +78,9 @@ jobs:
with:
name: patchbukkit-jar
path: java/patchbukkit/build/libs/
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Sync Pumpkin dependencies
run: cargo update -p pumpkin -p pumpkin-api-macros -p pumpkin-data -p pumpkin-protocol -p pumpkin-util
working-directory: rust
- name: Clippy (debug)
run: cargo clippy --all-targets --all-features
working-directory: rust
Expand All @@ -108,10 +103,9 @@ jobs:
with:
name: patchbukkit-jar
path: java/patchbukkit/build/libs/
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Sync Pumpkin dependencies
run: cargo update -p pumpkin -p pumpkin-api-macros -p pumpkin-data -p pumpkin-protocol -p pumpkin-util
working-directory: rust
- name: Clippy (release)
run: cargo clippy --release --all-targets --all-features
working-directory: rust
Expand Down Expand Up @@ -142,10 +136,9 @@ jobs:
with:
name: patchbukkit-jar
path: java/patchbukkit/build/libs/
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Sync Pumpkin dependencies
run: cargo update -p pumpkin -p pumpkin-api-macros -p pumpkin-data -p pumpkin-protocol -p pumpkin-util
working-directory: rust
- name: Build Release
shell: bash
run: |
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ If you wish to contribute to PatchBukkit, follow the following steps:
> Your PumpkinMC server must be built with the same nightly toolchain as PatchBukkit.

1. Run `./build.sh`
2. Copy the `target/debug/patchbukkit` binary to the `plugins` directory in your PumpkinMC server.
2. Copy the generated native library from `rust/target/debug/` (or `rust/target/release/`) to your PumpkinMC `plugins/` directory.
3. Start Pumpkin once to create the `patchbukkit/` directory in your server root, then place your `.jar` plugins in `patchbukkit/patchbukkit-plugins/`.

There is also an [architecture guide](https://github.com/Pumpkin-MC/PatchBukkit/blob/master/ARCHITECTURE.md) available.
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ cd java
./gradlew jar
cd ..
cd rust
cargo update -p pumpkin -p pumpkin-api-macros -p pumpkin-data -p pumpkin-protocol -p pumpkin-util
cargo build
2 changes: 1 addition & 1 deletion java/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
networkTimeout=10000
networkTimeout=120000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
19 changes: 18 additions & 1 deletion java/patchbukkit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ repositories {
}

dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT")
implementation("io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT")
implementation("net.sf.jopt-simple:jopt-simple:6.0-alpha-3")
implementation("io.github.astonbitecode:j4rs:0.24.0")
implementation("org.apache.maven:maven-resolver-provider:3.9.6")
Expand All @@ -69,3 +69,20 @@ tasks.withType<JavaCompile> {
"-Xlint:-deprecation"
))
}

tasks.named<Jar>("jar") {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
dependsOn(configurations.runtimeClasspath)

from({
configurations.runtimeClasspath.get()
.filter { it.name.endsWith(".jar") }
.map { zipTree(it) }
})

exclude(
"META-INF/*.SF",
"META-INF/*.DSA",
"META-INF/*.RSA"
)
}
Loading