From 1b9b371a193b35c9b0b95a4881fe61fb7ddbcc24 Mon Sep 17 00:00:00 2001 From: parzivail Date: Tue, 15 Oct 2024 21:57:04 -0400 Subject: [PATCH] blasters module, entrypoint module, temp remove upload script from CI pipeline --- .github/workflows/build.yml | 36 +++++++++--------- projects/pswg/project.gradle | 14 ------- projects/pswg/src/client/.gitkeep | 0 .../src/main/resources/fabric.mod.json | 2 +- .../client/java/dev/pswg/GalaxiesClient.java | 5 +++ projects/pswg_entrypoint/project.gradle | 3 ++ .../src/main/resources/assets/pswg/icon.png | Bin .../src/main/resources/fabric.mod.json | 0 settings.gradle.kts | 2 +- 9 files changed, 28 insertions(+), 34 deletions(-) delete mode 100644 projects/pswg/project.gradle delete mode 100644 projects/pswg/src/client/.gitkeep create mode 100644 projects/pswg_entrypoint/project.gradle rename projects/{pswg => pswg_entrypoint}/src/main/resources/assets/pswg/icon.png (100%) rename projects/{pswg => pswg_entrypoint}/src/main/resources/fabric.mod.json (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 27316927c..543f8fd5f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,21 +46,21 @@ jobs: - name: build id: gradle run: ./gradlew --stacktrace --parallel clean build - - name: Get Id Token - if: github.ref == 'refs/heads/master' - uses: actions/github-script@v7 - id: idtoken - with: - script: | - let id_token = await core.getIDToken("https://mc.pswg.dev") - core.setOutput('id_token', id_token) - - name: upload - if: always() && github.ref == 'refs/heads/master' && (steps.gradle.outcome == 'success' || steps.gradle.outcome == 'failure') - continue-on-error: true - run: | - pip install -r scripts/requirements.txt - mkdir -p projects/pswg/build/libs - cd projects/pswg/build/libs - python ../../../../scripts/upload_dev.py --token ${{ steps.idtoken.outputs.id_token }} --result ${{ steps.gradle.outcome }} --webhook ${{ secrets.DISCORD_DEV_FEED_WEBHOOK }} --webhook ${{ secrets.DISCORD_RCOE_WEBHOOK }} --serverupdate ${{ secrets.SERVER_UPDATER }} - env: - BUILD_NUMBER: ${{ github.run_number }} + # - name: Get Id Token + # if: github.ref == 'refs/heads/master' + # uses: actions/github-script@v7 + # id: idtoken + # with: + # script: | + # let id_token = await core.getIDToken("https://mc.pswg.dev") + # core.setOutput('id_token', id_token) + # - name: upload + # if: always() && github.ref == 'refs/heads/master' && (steps.gradle.outcome == 'success' || steps.gradle.outcome == 'failure') + # continue-on-error: true + # run: | + # pip install -r scripts/requirements.txt + # mkdir -p projects/pswg/build/libs + # cd projects/pswg/build/libs + # python ../../../../scripts/upload_dev.py --token ${{ steps.idtoken.outputs.id_token }} --result ${{ steps.gradle.outcome }} --webhook ${{ secrets.DISCORD_DEV_FEED_WEBHOOK }} --webhook ${{ secrets.DISCORD_RCOE_WEBHOOK }} --serverupdate ${{ secrets.SERVER_UPDATER }} + # env: + # BUILD_NUMBER: ${{ github.run_number }} diff --git a/projects/pswg/project.gradle b/projects/pswg/project.gradle deleted file mode 100644 index 25e0d3710..000000000 --- a/projects/pswg/project.gradle +++ /dev/null @@ -1,14 +0,0 @@ -loom { - splitEnvironmentSourceSets() - - mods { - "pswg_entrypoint" { - sourceSet sourceSets.main - sourceSet sourceSets.client - } - } -} - -dependencies { - api(project(path: ":projects:pswg_blasters", configuration: "namedElements")) -} diff --git a/projects/pswg/src/client/.gitkeep b/projects/pswg/src/client/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/projects/pswg_blasters/src/main/resources/fabric.mod.json b/projects/pswg_blasters/src/main/resources/fabric.mod.json index 926214114..4410ecd6a 100644 --- a/projects/pswg_blasters/src/main/resources/fabric.mod.json +++ b/projects/pswg_blasters/src/main/resources/fabric.mod.json @@ -33,7 +33,7 @@ } ], "depends": { - "pswg_core": "*" + "pswg": "*" }, "custom": { "modmenu": { diff --git a/projects/pswg_core/src/client/java/dev/pswg/GalaxiesClient.java b/projects/pswg_core/src/client/java/dev/pswg/GalaxiesClient.java index ecaca448a..5f8300da9 100644 --- a/projects/pswg_core/src/client/java/dev/pswg/GalaxiesClient.java +++ b/projects/pswg_core/src/client/java/dev/pswg/GalaxiesClient.java @@ -1,6 +1,8 @@ package dev.pswg; +import dev.pswg.api.GalaxiesClientAddon; import net.fabricmc.api.ClientModInitializer; +import net.fabricmc.loader.api.FabricLoader; /** * The main entrypoint for PSWG client-side registration @@ -10,6 +12,9 @@ public class GalaxiesClient implements ClientModInitializer @Override public void onInitializeClient() { + Galaxies.LOGGER.info("Loading PSWG modules and addons via pswg-client-addon"); + FabricLoader.getInstance().invokeEntrypoints("pswg-client-addon", GalaxiesClientAddon.class, GalaxiesClientAddon::onGalaxiesClientReady); + Galaxies.LOGGER.info("Galaxies client initialized"); } } diff --git a/projects/pswg_entrypoint/project.gradle b/projects/pswg_entrypoint/project.gradle new file mode 100644 index 000000000..8420f7d78 --- /dev/null +++ b/projects/pswg_entrypoint/project.gradle @@ -0,0 +1,3 @@ +dependencies { + api(project(path: ":projects:pswg_blasters", configuration: "namedElements")) +} diff --git a/projects/pswg/src/main/resources/assets/pswg/icon.png b/projects/pswg_entrypoint/src/main/resources/assets/pswg/icon.png similarity index 100% rename from projects/pswg/src/main/resources/assets/pswg/icon.png rename to projects/pswg_entrypoint/src/main/resources/assets/pswg/icon.png diff --git a/projects/pswg/src/main/resources/fabric.mod.json b/projects/pswg_entrypoint/src/main/resources/fabric.mod.json similarity index 100% rename from projects/pswg/src/main/resources/fabric.mod.json rename to projects/pswg_entrypoint/src/main/resources/fabric.mod.json diff --git a/settings.gradle.kts b/settings.gradle.kts index 6e6955155..88f1a7adc 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -15,7 +15,7 @@ include(":projects:pswg_core") include(":projects:pswg_blasters") // The dummy entrypoint module that depends on all other modules -include(":projects:pswg") +include(":projects:pswg_entrypoint") // The Aurek Tooklkit, a suite of ingame editors to add and edit base and addon features // include(":projects:toolkit")