Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to gradle, remove 1.19.4, switch to Mojang mappings, and shade libraries #652

Merged
merged 26 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
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: 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