From 259790778671d0023435a03d8be4912a84be3e7b Mon Sep 17 00:00:00 2001 From: Roman Makeev Date: Fri, 21 Aug 2026 16:06:07 +0300 Subject: [PATCH 1/3] [FEAT] Update CI --- .github/actions/setup-jdk/action.yml | 15 +++++++ .github/dependabot.yaml | 4 +- .github/workflows/call-build-project.yml | 27 +++++------ .github/workflows/call-detekt-validation.yml | 26 ++++++----- .../call-gradle-wrapper-validation.yml | 14 +++--- .github/workflows/call-tests-validation.yml | 25 ++++++----- .github/workflows/call-upload-artifacts.yml | 37 ++++++++------- .../workflows/call-upload-github-release.yml | 45 +++++++++---------- .../call-upload-modrinth-release.yml | 41 +++++++++-------- .github/workflows/call-version-changed.yml | 42 +++++++++++++++++ .github/workflows/check-develop.yml | 20 --------- .github/workflows/pr.yml | 31 ++++++++----- .github/workflows/release-master.yml | 21 +++++++-- gradle.properties | 2 +- 14 files changed, 211 insertions(+), 139 deletions(-) create mode 100644 .github/actions/setup-jdk/action.yml create mode 100644 .github/workflows/call-version-changed.yml delete mode 100644 .github/workflows/check-develop.yml diff --git a/.github/actions/setup-jdk/action.yml b/.github/actions/setup-jdk/action.yml new file mode 100644 index 0000000..accb758 --- /dev/null +++ b/.github/actions/setup-jdk/action.yml @@ -0,0 +1,15 @@ +name: "setup-jdk" +description: "Sets up the project JDK (Temurin) used across all workflows" +inputs: + java-version: + description: "JDK version to install" + required: false + default: "25" +runs: + using: "composite" + steps: + - name: Set up JDK ${{ inputs.java-version }} + uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 + with: + distribution: 'temurin' + java-version: ${{ inputs.java-version }} diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 6d33194..c5c388f 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -19,7 +19,9 @@ updates: - patch - package-ecosystem: "github-actions" - directory: "/" + directories: + - "/" + - "/.github/actions/*" schedule: interval: "monthly" day: "monday" diff --git a/.github/workflows/call-build-project.yml b/.github/workflows/call-build-project.yml index 26a5ebd..47dc08f 100644 --- a/.github/workflows/call-build-project.yml +++ b/.github/workflows/call-build-project.yml @@ -1,9 +1,13 @@ -name: "detekt-validation" +name: "build-project" on: workflow_call: + +permissions: + contents: read + jobs: - build: - name: Build project with gradle + build_project: + name: Build ${{ matrix.id }} with Gradle runs-on: ubuntu-latest strategy: matrix: @@ -16,15 +20,12 @@ jobs: task: ":instances:bukkit:build" steps: - name: Checkout Git repo - uses: actions/checkout@v6 - - name: Set up JDK 21 - uses: actions/setup-java@v5 - with: - distribution: 'adopt' - java-version: 21 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 + - name: Set up JDK + uses: ./.github/actions/setup-jdk + - name: Set up Gradle + uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6 - name: Give gradle permission run: chmod +x gradlew - - name: Build with Gradle - uses: gradle/gradle-build-action@v3 - with: - arguments: ${{ matrix.task }} --stacktrace + - name: Build ${{ matrix.id }} with Gradle + run: ./gradlew ${{ matrix.task }} --stacktrace diff --git a/.github/workflows/call-detekt-validation.yml b/.github/workflows/call-detekt-validation.yml index 56134ee..9a68b66 100644 --- a/.github/workflows/call-detekt-validation.yml +++ b/.github/workflows/call-detekt-validation.yml @@ -1,20 +1,22 @@ name: "detekt-validation" on: workflow_call: + +permissions: + contents: read + jobs: - detekt: - name: "Check project by detekt" + detekt_validation: + name: Validate project with detekt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 - - name: Set up JDK 21 - uses: actions/setup-java@v5 - with: - distribution: 'temurin' - java-version: '21' + - name: Checkout Git repo + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 + - name: Set up JDK + uses: ./.github/actions/setup-jdk + - name: Set up Gradle + uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6 - name: Give gradle permission run: chmod +x gradlew - - name: detekt - uses: gradle/gradle-build-action@v3 - with: - arguments: detekt \ No newline at end of file + - name: Run detekt + run: ./gradlew detekt diff --git a/.github/workflows/call-gradle-wrapper-validation.yml b/.github/workflows/call-gradle-wrapper-validation.yml index b0e496d..805dfef 100644 --- a/.github/workflows/call-gradle-wrapper-validation.yml +++ b/.github/workflows/call-gradle-wrapper-validation.yml @@ -2,11 +2,15 @@ name: "gradle-wrapper-validation" on: workflow_call: +permissions: + contents: read + jobs: - validation: - name: "Gradle Wrapper Validation" + gradle_wrapper_validation: + name: Validate Gradle wrapper runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 - - name: Validate Gradle Wrapper - uses: gradle/actions/wrapper-validation@v6 \ No newline at end of file + - name: Checkout Git repo + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 + - name: Validate Gradle wrapper + uses: gradle/actions/wrapper-validation@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6 diff --git a/.github/workflows/call-tests-validation.yml b/.github/workflows/call-tests-validation.yml index f27ce31..2cefed5 100644 --- a/.github/workflows/call-tests-validation.yml +++ b/.github/workflows/call-tests-validation.yml @@ -1,21 +1,22 @@ -name: "tests" +name: "tests-validation" on: workflow_call: +permissions: + contents: read + jobs: - tests: - name: "Run tests" + tests_validation: + name: Run tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 - - name: Set up JDK 21 - uses: actions/setup-java@v5 - with: - distribution: 'adopt' - java-version: '21' + - name: Checkout Git repo + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 + - name: Set up JDK + uses: ./.github/actions/setup-jdk + - name: Set up Gradle + uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6 - name: Give gradle permission run: chmod +x gradlew - name: Run tests - uses: gradle/gradle-build-action@v3 - with: - arguments: test \ No newline at end of file + run: ./gradlew test diff --git a/.github/workflows/call-upload-artifacts.yml b/.github/workflows/call-upload-artifacts.yml index 6087553..45b90c9 100644 --- a/.github/workflows/call-upload-artifacts.yml +++ b/.github/workflows/call-upload-artifacts.yml @@ -1,9 +1,13 @@ -name: "Upload artifacts" +name: "upload-artifacts" on: workflow_call: + +permissions: + contents: read + jobs: upload_artifacts: - name: Build and upload + name: Build and upload ${{ matrix.id }} dist runs-on: ubuntu-latest strategy: matrix: @@ -16,25 +20,24 @@ jobs: task: ":instances:bukkit:shadowJar" steps: - name: Checkout Git repo - uses: actions/checkout@v6 - - uses: christian-draeger/read-properties@1.1.1 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 + - name: Read project properties id: properties + uses: christian-draeger/read-properties@908f99d3334be3802ec7cb528395a69d19914e7b # 1.1.1 with: path: './gradle.properties' properties: 'klibs.project.name' - - name: Set up JDK 21 - uses: actions/setup-java@v5 - with: - distribution: 'adopt' - java-version: 21 + - name: Set up JDK + uses: ./.github/actions/setup-jdk + - name: Set up Gradle + uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6 - name: Give gradle permission run: chmod +x gradlew - - name: Build with Gradle ${{ matrix.id }} - uses: gradle/gradle-build-action@v3 - with: - arguments: ${{ matrix.task }} --stacktrace - - uses: actions/upload-artifact@6027e3dd177782cd8ab9af838c04fd81a07f1d47 - name: "Upload ${{ matrix.id }}" + - name: Build ${{ matrix.id }} with Gradle + run: ./gradlew ${{ matrix.task }} --stacktrace + - name: Upload ${{ matrix.id }} dist + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 with: - name: ${{ matrix.id }} - path: ./jars/${{ steps.properties.outputs.klibs-project-name }}-${{ matrix.id }}*.jar \ No newline at end of file + name: dist-${{ matrix.id }} + # ./jars is the Gradle shadowJar output directory (see instances/*/build.gradle.kts) + path: ./jars/${{ steps.properties.outputs.klibs-project-name }}-${{ matrix.id }}*.jar diff --git a/.github/workflows/call-upload-github-release.yml b/.github/workflows/call-upload-github-release.yml index a323191..53c4e7d 100644 --- a/.github/workflows/call-upload-github-release.yml +++ b/.github/workflows/call-upload-github-release.yml @@ -1,46 +1,45 @@ -name: "Upload GitHub release" +name: "upload-github-release" on: workflow_call: secrets: ACTIONS_TOKEN: - required: true + description: "Optional personal access token used to create the release. Falls back to the default GITHUB_TOKEN when not provided." + required: false + +# `contents: write` is required to create a release with the default +# GITHUB_TOKEN. The caller job must grant the same permission. +permissions: + contents: write + jobs: upload_github_release: name: Upload GitHub release runs-on: ubuntu-latest steps: - name: Checkout Git repo - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 - - uses: christian-draeger/read-properties@1.1.1 + - name: Read project properties id: properties + uses: christian-draeger/read-properties@908f99d3334be3802ec7cb528395a69d19914e7b # 1.1.1 with: path: './gradle.properties' properties: 'klibs.project.name klibs.project.version.string' - - uses: actions/download-artifact@d0ce8fd1167ed839810201de977912a090ab10a7 - name: "Download neoforge" - with: - name: neoforge - path: ./jars - - uses: actions/download-artifact@d0ce8fd1167ed839810201de977912a090ab10a7 - name: "Download bukkit" - with: - name: bukkit - path: ./jars - - uses: actions/download-artifact@d0ce8fd1167ed839810201de977912a090ab10a7 - name: "Download forge" + - name: Download dists + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6 with: - name: forge - path: ./jars + pattern: dist-* + path: ./dist + merge-multiple: true - - name: Create release - id: create_internal_release - uses: softprops/action-gh-release@v2 + - name: Create GitHub release + id: create_github_release + uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2 env: - GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }} + GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN || github.token }} with: files: | - ./jars/*.jar + ./dist/*.jar tag_name: ${{ steps.properties.outputs.klibs-project-version-string }} name: ${{ steps.properties.outputs.klibs-project-name }} - ${{ steps.properties.outputs.klibs-project-version-string }} draft: false diff --git a/.github/workflows/call-upload-modrinth-release.yml b/.github/workflows/call-upload-modrinth-release.yml index fa61c69..6f25220 100644 --- a/.github/workflows/call-upload-modrinth-release.yml +++ b/.github/workflows/call-upload-modrinth-release.yml @@ -1,47 +1,46 @@ -name: "Upload Modrinth release" +name: "upload-modrinth-release" on: workflow_call: secrets: MODRINTH_TOKEN: + description: "Modrinth API token used to publish the release." required: true + +permissions: + contents: read + jobs: - upload_github_release: - name: Upload GitHub release + upload_modrinth_release: + name: Upload ${{ matrix.id }} Modrinth release runs-on: ubuntu-latest strategy: matrix: - include: - - id: "neoforge" - task: ":instances:neoforge:shadowJar" - - id: "forge" - task: ":instances:forge:shadowJar" - - id: "bukkit" - task: ":instances:bukkit:shadowJar" + id: [ "neoforge", "forge", "bukkit" ] steps: - name: Checkout Git repo - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 - - uses: christian-draeger/read-properties@1.1.1 + - name: Read project properties id: properties + uses: christian-draeger/read-properties@908f99d3334be3802ec7cb528395a69d19914e7b # 1.1.1 with: path: './gradle.properties' properties: 'klibs.project.name klibs.project.version.string' - - uses: actions/download-artifact@d0ce8fd1167ed839810201de977912a090ab10a7 - name: "Download ${{ matrix.id }}" + - name: Download ${{ matrix.id }} dist + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6 with: - name: ${{ matrix.id }} - path: ./jars/${{ matrix.id }} - - uses: Kir-Antipov/mc-publish@v3.3 + name: dist-${{ matrix.id }} + path: ./dist/${{ matrix.id }} + - name: Publish ${{ matrix.id }} to Modrinth + uses: Kir-Antipov/mc-publish@52307b03863581dec6b652b83e597aec02ebb075 # v3.3 with: - # Only include this section if you wish to publish - # your assets on Modrinth. modrinth-id: 6NpNwzA1 modrinth-token: ${{ secrets.MODRINTH_TOKEN }} name: ${{ steps.properties.outputs.klibs-project-name }}-${{ matrix.id }} version: ${{ steps.properties.outputs.klibs-project-version-string }} changelog: ${{ join(github.event.commits.*.message, '\n') }} - version_type: beta + version-type: beta java: | 21 loaders: | @@ -49,4 +48,4 @@ jobs: game-versions: | [1.16,1.21.1) files: | - ./jars/${{ matrix.id }}/*.jar + ./dist/${{ matrix.id }}/*.jar diff --git a/.github/workflows/call-version-changed.yml b/.github/workflows/call-version-changed.yml new file mode 100644 index 0000000..86860dd --- /dev/null +++ b/.github/workflows/call-version-changed.yml @@ -0,0 +1,42 @@ +name: "version-changed" +on: + workflow_call: + +permissions: + contents: read + +jobs: + version_changed: + name: Validate version is changed + runs-on: ubuntu-latest + steps: + - name: Checkout Git repo + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 + - name: Checkout base branch + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 + with: + ref: ${{ github.base_ref }} + path: base + - name: Read current version + id: current + uses: christian-draeger/read-properties@908f99d3334be3802ec7cb528395a69d19914e7b # 1.1.1 + with: + path: './gradle.properties' + properties: 'klibs.project.version.string' + - name: Read base version + id: base + uses: christian-draeger/read-properties@908f99d3334be3802ec7cb528395a69d19914e7b # 1.1.1 + with: + path: './base/gradle.properties' + properties: 'klibs.project.version.string' + - name: Check klibs.project.version.string is changed + env: + BASE_VERSION: ${{ steps.base.outputs.klibs-project-version-string }} + CURRENT_VERSION: ${{ steps.current.outputs.klibs-project-version-string }} + run: | + echo "Base version: ${BASE_VERSION}" + echo "Current version: ${CURRENT_VERSION}" + if [ -z "${CURRENT_VERSION}" ] || [ "${CURRENT_VERSION}" = "${BASE_VERSION}" ]; then + echo "::error file=gradle.properties::klibs.project.version.string is not changed (still ${CURRENT_VERSION}). Bump the version before merging." + exit 1 + fi diff --git a/.github/workflows/check-develop.yml b/.github/workflows/check-develop.yml deleted file mode 100644 index 3b9512a..0000000 --- a/.github/workflows/check-develop.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Check Develop -on: - push: - branches: - - develop -jobs: - gradle_validation: - name: Validate gradle wrapper - uses: ./.github/workflows/call-gradle-wrapper-validation.yml - detekt_validation: - name: Check by detekt - needs: gradle_validation - uses: ./.github/workflows/call-detekt-validation.yml - tests_validation: - needs: gradle_validation - uses: ./.github/workflows/call-tests-validation.yml - build: - name: Build project - needs: [ gradle_validation, detekt_validation,tests_validation ] - uses: ./.github/workflows/call-build-project.yml \ No newline at end of file diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 03dfcad..7f9faa7 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,10 +1,16 @@ -name: Check Develop +name: Pull Request Check on: pull_request: branches: - 'develop' - 'master' +# Explicit least-privilege token permissions so the workflow behaves +# the same in personal repositories and organizations regardless of +# the default GITHUB_TOKEN settings. +permissions: + contents: read + # Concurrency strategy: # github.workflow: distinguish this workflow from others # github.event_name: distinguish `push` event from `pull_request` event @@ -15,21 +21,26 @@ on: # https://docs.github.com/en/actions/using-jobs/using-concurrency # https://docs.github.com/en/actions/learn-github-actions/contexts#github-context concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{github.ref_name}}-${{github.repository}} + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name }}-${{ github.repository }} cancel-in-progress: true jobs: - gradle_validation: - name: Validate gradle wrapper + gradle_wrapper_validation: + name: Validate Gradle wrapper uses: ./.github/workflows/call-gradle-wrapper-validation.yml + version_changed: + name: Validate version is changed + needs: gradle_wrapper_validation + uses: ./.github/workflows/call-version-changed.yml detekt_validation: - name: Check by detekt - needs: gradle_validation + name: Validate with detekt + needs: gradle_wrapper_validation uses: ./.github/workflows/call-detekt-validation.yml tests_validation: - needs: gradle_validation + name: Run tests + needs: gradle_wrapper_validation uses: ./.github/workflows/call-tests-validation.yml - build: + build_project: name: Build project - needs: [ gradle_validation, detekt_validation, tests_validation ] - uses: ./.github/workflows/call-build-project.yml \ No newline at end of file + needs: [ gradle_wrapper_validation, detekt_validation, tests_validation ] + uses: ./.github/workflows/call-build-project.yml diff --git a/.github/workflows/release-master.yml b/.github/workflows/release-master.yml index 7cd59b6..41aa7c8 100644 --- a/.github/workflows/release-master.yml +++ b/.github/workflows/release-master.yml @@ -1,16 +1,29 @@ -name: CI +name: Release Master on: push: branches: - master + +# Explicit least-privilege token permissions so the workflow behaves +# the same in personal repositories and organizations regardless of +# the default GITHUB_TOKEN settings. Jobs that need more (e.g. creating +# a release) elevate their permissions individually. +permissions: + contents: read + jobs: - gradle_validation: + gradle_wrapper_validation: + name: Validate Gradle wrapper uses: ./.github/workflows/call-gradle-wrapper-validation.yml upload_artifacts: - needs: [ gradle_validation ] + name: Build and upload artifacts + needs: [ gradle_wrapper_validation ] uses: ./.github/workflows/call-upload-artifacts.yml - upload_github_artifacts: + upload_github_release: + name: Upload GitHub release needs: [ upload_artifacts ] + permissions: + contents: write uses: ./.github/workflows/call-upload-github-release.yml secrets: ACTIONS_TOKEN: ${{ secrets.ACTIONS_TOKEN }} diff --git a/gradle.properties b/gradle.properties index 05c2de2..08db328 100755 --- a/gradle.properties +++ b/gradle.properties @@ -15,7 +15,7 @@ klibs.java.ktarget=25 # Project klibs.project.name=MessageBridge klibs.project.group=ru.astrainteractive.messagebridge -klibs.project.version.string=0.26.0 +klibs.project.version.string=0.27.0 klibs.project.description=Bridge for TG and Discord klibs.project.developers=makeevrserg|Makeev Roman|makeevrserg@gmail.com klibs.project.url=https://empireprojekt.ru From 2b80ed17e8128209ad8b5a6c18678baf09010253 Mon Sep 17 00:00:00 2001 From: Roman Makeev Date: Fri, 21 Aug 2026 16:18:46 +0300 Subject: [PATCH 2/3] [FIX] Disable cache --- gradle.properties | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index 08db328..3073ed0 100755 --- a/gradle.properties +++ b/gradle.properties @@ -1,12 +1,12 @@ # Gradle kotlin.code.style=official kotlin.incremental=true -org.gradle.caching=true -org.gradle.configuration-cache=true +org.gradle.caching=false +org.gradle.configuration-cache=false org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -XX:+UseParallelGC -Dfile.encoding=UTF-8 kotlin.daemon.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -org.gradle.parallel=true -org.gradle.tooling.parallel=true +org.gradle.parallel=false +org.gradle.tooling.parallel=false org.gradle.isolated-projects=false # Java klibs.java.source=8 From fb66f0bfb7a6f6e340ed507866e7e82154bfc7ff Mon Sep 17 00:00:00 2001 From: Roman Makeev Date: Fri, 21 Aug 2026 16:44:22 +0300 Subject: [PATCH 3/3] [FIX] Fix neoforge task concurrency --- gradle.properties | 8 ++++---- instances/neoforge/build.gradle.kts | 11 +++++++++++ modules/core/neoforge/build.gradle.kts | 6 ++++++ modules/messenger/neoforge/build.gradle.kts | 6 ++++++ 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index 3073ed0..08db328 100755 --- a/gradle.properties +++ b/gradle.properties @@ -1,12 +1,12 @@ # Gradle kotlin.code.style=official kotlin.incremental=true -org.gradle.caching=false -org.gradle.configuration-cache=false +org.gradle.caching=true +org.gradle.configuration-cache=true org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -XX:+UseParallelGC -Dfile.encoding=UTF-8 kotlin.daemon.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -org.gradle.parallel=false -org.gradle.tooling.parallel=false +org.gradle.parallel=true +org.gradle.tooling.parallel=true org.gradle.isolated-projects=false # Java klibs.java.source=8 diff --git a/instances/neoforge/build.gradle.kts b/instances/neoforge/build.gradle.kts index 198b829..a63bced 100644 --- a/instances/neoforge/build.gradle.kts +++ b/instances/neoforge/build.gradle.kts @@ -1,4 +1,5 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar +import net.neoforged.gradle.common.tasks.ArtifactFromOutput import ru.astrainteractive.gradleplugin.property.util.requireProjectInfo plugins { @@ -179,3 +180,13 @@ val shadowJar by tasks.getting(ShadowJar::class) { dependencies { compileOnly(libs.minecraft.neoforgeversion) } + +tasks.configureEach { + if (javaClass.name.startsWith("net.neoforged.gradle")) { + notCompatibleWithConfigurationCache("NeoGradle tasks access Task.project at execution time") + } +} + +tasks.register("generateNeoforgeJar") { + dependsOn(tasks.withType()) +} diff --git a/modules/core/neoforge/build.gradle.kts b/modules/core/neoforge/build.gradle.kts index 9aa7115..2bc065e 100644 --- a/modules/core/neoforge/build.gradle.kts +++ b/modules/core/neoforge/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + plugins { id("org.jetbrains.kotlin.jvm") id("org.jetbrains.kotlin.plugin.serialization") @@ -38,3 +40,7 @@ dependencies { compileOnly(libs.minecraft.neoforged.bus) compileOnly(libs.minecraft.neoforgeversion) } + +tasks.withType().configureEach { + dependsOn(":instances:neoforge:generateNeoforgeJar") +} diff --git a/modules/messenger/neoforge/build.gradle.kts b/modules/messenger/neoforge/build.gradle.kts index f6c08da..1639798 100644 --- a/modules/messenger/neoforge/build.gradle.kts +++ b/modules/messenger/neoforge/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + plugins { id("org.jetbrains.kotlin.jvm") id("org.jetbrains.kotlin.plugin.serialization") @@ -42,3 +44,7 @@ dependencies { compileOnly(libs.minecraft.brigadier) compileOnly(libs.minecraft.neoforged.bus) } + +tasks.withType().configureEach { + dependsOn(":instances:neoforge:generateNeoforgeJar") +}