Skip to content

Commit

Permalink
Switch to gradle, remove 1.19.4, switch to Mojang mappings, and shade…
Browse files Browse the repository at this point in the history
… libraries (#652)

* Update gitignore

* Initial conversion

* Fix API compile

* Move NMS from libs to individual files

* Remove 1.19.4

* Remove maven

* Remove devcontainer

* Now we're cooking with mojang mappings

1.18 worldhandler compiles

* Build completed?

* Update CI

* Update gradle permissions

* Add datapack build

* Start working on Movecraft build

* Almost there with shadowJar

* WIP

* Clean up

* Working datapack and license to jar

* Add roaringbitmap as library

* Fix version embed

* WIP

* Reorganize modules

* Try fix for PaperMC/paperweight#161

* Build a (hopefully) working jar

* Fix 1.18 being mojang mapped

* Refactor audiences
  • Loading branch information
TylerS1066 authored Jun 20, 2024
1 parent a5c3d6d commit 077b7c9
Show file tree
Hide file tree
Showing 258 changed files with 678 additions and 1,827 deletions.
25 changes: 0 additions & 25 deletions .devcontainer/Dockerfile

This file was deleted.

50 changes: 0 additions & 50 deletions .devcontainer/devcontainer.json

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Java CI

on:
workflow_dispatch:
push:
pull_request:
schedule:
- cron: '22 13 * * 6'

jobs:
# Build Movecraft
build:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout Movecraft
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
build-scan-terms-of-use-agree: "yes"

- name: Build with Gradle
run: ./gradlew clean shadowJar

- name: Stage jar
run: mkdir staging && cp Movecraft/build/libs/Movecraft.jar staging && mv staging/Movecraft.jar staging/Movecraft_$GITHUB_SHA.jar
- name: Upload jar
uses: actions/upload-artifact@v4
with:
name: Movecraft_Dev-Build
path: staging/Movecraft_*.jar
193 changes: 0 additions & 193 deletions .github/workflows/maven.yml

This file was deleted.

53 changes: 1 addition & 52 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,48 +48,6 @@ jobs:
if: steps.caves.outputs.sucess != 'true' || steps.cavesMojang.outputs.sucess != 'true' || steps.cavesObf.outputs.sucess != 'true'
run: cd BuildTools && java -jar BuildTools.jar --rev 1.18.2 --remapped

# Build 1.19.4 NMS
v1_19:
runs-on: ubuntu-latest
steps:
- name: Set up JDK 17 # 1.19.4 can only be built with Java 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Cache 1.19.4 Maven package
id: cacheWild_r2
uses: actions/cache@v3
with:
path: |
~/.m2/repository/org/spigotmc/spigot/1.19.4-R0.1-SNAPSHOT/
~/.m2/repository/org/spigotmc/spigot-parent/
~/.m2/repository/org/spigotmc/minecraft-server/
key: ${{ runner.os }}-v1_19
restore-keys: ${{ runner.os }}-v1_19
- name: Cache Maven packages
id: cacheMain
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-v1_19
restore-keys: ${{ runner.os }}-m2-v1_19

- name: Setup BuildTools
run: mkdir BuildTools && wget -O BuildTools/BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
- name: Check 1.19.4 Spigot
id: wild
run: test -f ~/.m2/repository/org/spigotmc/spigot/1.19.4-R0.1-SNAPSHOT/spigot-1.19.4-R0.1-SNAPSHOT.jar && echo "sucess=true" >> $GITHUB_OUTPUT || echo "sucess=false" >> $GITHUB_OUTPUT
- name: Check 1.19.4 Spigot (Mojang)
id: wildMojang
run: test -f ~/.m2/repository/org/spigotmc/spigot/1.19.4-R0.1-SNAPSHOT/spigot-1.19.4-R0.1-SNAPSHOT-remapped-mojang.jar && echo "sucess=true" >> $GITHUB_OUTPUT || echo "sucess=false" >> $GITHUB_OUTPUT
- name: Check 1.19.4 Spigot (Obf)
id: wildObf
run: test -f ~/.m2/repository/org/spigotmc/spigot/1.19.4-R0.1-SNAPSHOT/spigot-1.19.4-R0.1-SNAPSHOT-remapped-obf.jar && echo "sucess=true" >> $GITHUB_OUTPUT || echo "sucess=false" >> $GITHUB_OUTPUT
- name: Build 1.19.4
if: steps.wild.outputs.sucess != 'true' || steps.wildMojang.outputs.sucess != 'true' || steps.wildObf.outputs.sucess != 'true'
run: cd BuildTools && java -jar BuildTools.jar --rev 1.19.4 --remapped

# Build 1.20.6 NMS
v1_20:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -135,7 +93,7 @@ jobs:
# Build Movecraft
build:
runs-on: ubuntu-latest
needs: [v1_18, v1_19, v1_20]
needs: [v1_18, v1_20]

steps:
- name: Checkout Movecraft
Expand All @@ -160,15 +118,6 @@ jobs:
~/.m2/repository/org/spigotmc/minecraft-server/
key: ${{ runner.os }}-v1_18
restore-keys: ${{ runner.os }}-v1_18
- name: Cache 1.19.4 Maven package
uses: actions/cache@v3
with:
path: |
~/.m2/repository/org/spigotmc/spigot/1.19.4-R0.1-SNAPSHOT/
~/.m2/repository/org/spigotmc/spigot-parent/
~/.m2/repository/org/spigotmc/minecraft-server/
key: ${{ runner.os }}-v1_19
restore-keys: ${{ runner.os }}-v1_19
- name: Cache 1.20.6 Maven package
uses: actions/cache@v3
with:
Expand Down
Loading

0 comments on commit 077b7c9

Please sign in to comment.