From 7c96fc778db002acccd7c0c814f72855b4ea76e9 Mon Sep 17 00:00:00 2001 From: Roman Makeev Date: Mon, 24 Aug 2026 00:09:36 +0300 Subject: [PATCH 1/3] [FEAT] Update deps --- .github/actions/setup-jdk/action.yml | 15 ++ .github/dependabot.yaml | 4 +- .github/workflows/call-build-project.yml | 35 ++-- .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 | 41 ++--- .../workflows/call-upload-github-release.yml | 48 +++--- .../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 | 24 ++- .gitignore | 9 +- build.gradle.kts | 2 +- gradle.properties | 16 +- gradle/libs.versions.toml | 61 ++++--- gradle/wrapper/gradle-wrapper.properties | 2 +- instances/bukkit/build.gradle.kts | 150 ++++++++--------- instances/forge/build.gradle.kts | 156 +++++++++--------- instances/neoforge/build.gradle.kts | 102 ++++++------ 21 files changed, 470 insertions(+), 394 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 00000000..accb7587 --- /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 6d33194a..c5c388f0 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 a51674a9..e14c1740 100644 --- a/.github/workflows/call-build-project.yml +++ b/.github/workflows/call-build-project.yml @@ -1,30 +1,31 @@ -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: include: - - id: "bukkit" - task: ":instances:bukkit:build" - id: "neoforge" - task: ":instances:neoforge:build --info --stacktrace" + task: ":instances:neoforge:build" - id: "forge" - task: ":instances:forge:build --info --stacktrace" + task: ":instances:forge:build" + - id: "bukkit" + 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - 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 56134ee4..0b22800b 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - 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 b0e496d1..04f91da1 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - 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 6334448d..3b254f02 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - 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 --info --stacktrace \ 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 e38f050b..d44cc79a 100644 --- a/.github/workflows/call-upload-artifacts.yml +++ b/.github/workflows/call-upload-artifacts.yml @@ -1,40 +1,43 @@ -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: include: - - id: "bukkit" - task: ":instances:bukkit:shadowJar" - id: "neoforge" task: ":instances:neoforge:shadowJar" - id: "forge" task: ":instances:forge:shadowJar" + - id: "bukkit" + task: ":instances:bukkit:shadowJar" steps: - name: Checkout Git repo - uses: actions/checkout@v6 - - uses: christian-draeger/read-properties@1.1.1 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - 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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 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 763e5f17..cbf47d18 100644 --- a/.github/workflows/call-upload-github-release.yml +++ b/.github/workflows/call-upload-github-release.yml @@ -1,49 +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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - 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 bukkit" - with: - name: bukkit - path: ./jars - - - uses: actions/download-artifact@d0ce8fd1167ed839810201de977912a090ab10a7 - name: "Download neoforge" - with: - name: neoforge - path: ./jars - - - uses: actions/download-artifact@d0ce8fd1167ed839810201de977912a090ab10a7 - name: "Download forge" + - name: Download dists + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 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@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2 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 ba138d81..87f456c7 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: "bukkit" - task: ":instances:bukkit:shadowJar" - - id: "neoforge" - task: ":instances:neoforge:shadowJar" - - id: "forge" - task: ":instances:forge:shadowJar" + id: [ "neoforge", "forge", "bukkit" ] steps: - name: Checkout Git repo - uses: actions/checkout@v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - 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@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 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: tnr41XhG 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 00000000..2b3d0208 --- /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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Checkout base branch + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + 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 3b9512a8..00000000 --- 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 03dfcad5..7f9faa7d 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 0e0e5b1c..f8c63e69 100644 --- a/.github/workflows/release-master.yml +++ b/.github/workflows/release-master.yml @@ -1,20 +1,34 @@ -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 }} - upload_modrinth_artifacts: + upload_modrinth_release: + name: Upload Modrinth release needs: [ upload_artifacts ] uses: ./.github/workflows/call-upload-modrinth-release.yml secrets: diff --git a/.gitignore b/.gitignore index 0423ab65..76f748c4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,9 @@ **/build -**/runs -.DS_Store +**/runs/ +*.jar +.claude .gradle .idea .kotlin -local.properties -*.jar \ No newline at end of file +AGENTS.md +CLAUDE.md \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 1f3a5b92..956d26d4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,7 @@ plugins { alias(libs.plugins.gradle.buildconfig) apply false alias(libs.plugins.gradle.neoforgegradle) apply false - alias(libs.plugins.klibs.gradle.detekt) apply false + alias(libs.plugins.klibs.gradle.detekt) alias(libs.plugins.klibs.gradle.java.version) apply false alias(libs.plugins.klibs.gradle.minecraft.platform) apply false alias(libs.plugins.klibs.gradle.publication) apply false diff --git a/gradle.properties b/gradle.properties index af3bf988..44a0d44a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,11 +1,13 @@ # Gradle -org.gradle.parallel=false -org.gradle.configuration-cache=false -org.gradle.caching=false -kotlin.incremental=false -org.gradle.jvmargs=-Xmx5g -XX:+UseParallelGC -Dkotlin.daemon.jvm.options\="-Xmx5G" kotlin.code.style=official -testTask.ignoreFailures=false +kotlin.incremental=true +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=true +org.gradle.tooling.parallel=true +org.gradle.isolated-projects=false # Java klibs.java.source=8 klibs.java.target=25 @@ -13,7 +15,7 @@ klibs.java.ktarget=25 # Project klibs.project.name=SoulKeeper klibs.project.group=ru.astrainteractive.soulkeeper -klibs.project.version.string=1.9.0 +klibs.project.version.string=1.10.0 klibs.project.description=Keep your items after death klibs.project.developers=makeevrserg|Makeev Roman|makeevrserg@gmail.com klibs.project.url=https://github.com/Astra-Interactive/SoulKeeper diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c439ac41..8b0781a2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,32 +1,32 @@ [versions] cache4k = "0.14.0" # https://github.com/ReactiveCircus/cache4k -checkerfraemwork-qual = "3.12.0" # https://github.com/typetools/checker-framework/ +checkerfraemwork-qual = "4.2.2" # https://github.com/typetools/checker-framework/ discordsrv = "1.30.5" # https://github.com/DiscordSRV/DiscordSRV driver-h2 = "2.4.240" # https://github.com/h2database/h2database -driver-jdbc = "3.53.2.0" # https://github.com/xerial/sqlite-jdbc -driver-mariadb = "3.5.9" # https://github.com/mariadb-corporation/mariadb-connector-j -driver-mysql = "9.7.0" # https://github.com/mysql/mysql-connector-j -exposed = "1.3.0" # https://github.com/JetBrains/Exposed +driver-jdbc = "3.53.2.1" # https://github.com/xerial/sqlite-jdbc +driver-mariadb = "3.5.10" # https://github.com/mariadb-corporation/mariadb-connector-j +driver-mysql = "26.7.0" # https://github.com/mysql/mysql-connector-j +exposed = "1.4.0" # https://github.com/JetBrains/Exposed gradle-buildconfig = "6.0.10" # https://github.com/gmazzo/gradle-buildconfig-plugin -gradle-ftp = "0.2.0" # https://github.com/makeevrserg/GradleFtpPlugin -gradle-shadow = "9.4.2" # https://github.com/GradleUp/shadow +gradle-ftp = "0.3.0" # https://github.com/makeevrserg/GradleFtpPlugin +gradle-shadow = "9.6.1" # https://github.com/GradleUp/shadow gson = "2.14.0" # https://github.com/google/gson -guava = "33.6.0-jre" # https://github.com/google/guava -jda = "6.4.2" # https://github.com/discord-jda/JDA +guava = "33.7.1-jre" # https://github.com/google/guava +jda = "6.5.0" # https://github.com/discord-jda/JDA jda-webhook = "0.8.4" # https://github.com/MinnDevelopment/discord-webhooks jmh-core = "1.37" # https://github.com/openjdk/jmh joml = "1.10.9" # https://github.com/JOML-CI/JOML -klibs-gradleplugin = "2.3.0" # https://github.com/makeevrserg/gradle-plugin -klibs-kstorage = "5.2.0" # https://github.com/makeevrserg/klibs.kstorage -klibs-mikro = "1.27.0" # https://github.com/makeevrserg/klibs.mikro +klibs-gradleplugin = "2.7.1" # https://github.com/makeevrserg/gradle-plugin +klibs-kstorage = "5.3.1" # https://github.com/makeevrserg/klibs.kstorage +klibs-mikro = "1.28.1" # https://github.com/makeevrserg/klibs.mikro kotlin-benchmark = "0.4.17" # https://github.com/Kotlin/kotlinx-benchmark kotlin-coroutines = "1.11.0" # https://github.com/Kotlin/kotlinx.coroutines kotlin-datetime = "0.8.0" # https://github.com/Kotlin/kotlinx-datetime kotlin-serialization = "1.11.0" # https://github.com/kotlin/kotlinx.serialization kotlin-serialization-kaml = "0.104.0" # https://github.com/charleskorn/kaml -kotlin-version = "2.4.0" # https://github.com/jetbrains/kotlin -ktor = "3.5.0" # https://github.com/ktorio/ktor -minecraft-astralibs = "3.41.0" # https://github.com/Astra-Interactive/AstraLibs +kotlin-version = "2.4.10" # https://github.com/jetbrains/kotlin +ktor = "3.5.2" # https://github.com/ktorio/ktor +minecraft-astralibs = "3.43.1" # https://github.com/Astra-Interactive/AstraLibs minecraft-authlib = "6.0.54" # https://mvnrepository.com/artifact/com.mojang/authlib minecraft-brigadier = "1.3.10" # https://github.com/Mojang/brigadier minecraft-bstats = "3.2.1" # https://github.com/Bastian/bStats-Metrics @@ -36,14 +36,14 @@ minecraft-essentialsx = "2.21.2" # https://github.com/EssentialsX/Essentials minecraft-fabric-api = "0.152.2+" # https://github.com/FabricMC/fabric minecraft-fabric-kotlin = "1.13.12+" # https://github.com/FabricMC/fabric-language-kotlin minecraft-fabric-loader = "0.19.3" # https://github.com/FabricMC/fabric-loader -minecraft-fabric-loom = "1.17.12" # https://github.com/FabricMC/fabric-loom +minecraft-fabric-loom = "1.17.19" # https://github.com/FabricMC/fabric-loom minecraft-fabric-yarn = "1.20.1+build.10" # https://github.com/FabricMC/yarn minecraft-forge-bus = "6.0.5" # https://github.com/MinecraftForge/EventBus -minecraft-forgegradle = "7.0.29" # https://github.com/MinecraftForge/ForgeGradle -minecraft-forge-jarjar = "0.2.3" -minecraft-forgerenamer = "1.1.2" # https://github.com/MinecraftForge/renamer +minecraft-forge-jarjar = "0.2.3" # https://github.com/MinecraftForge/JarJar +minecraft-forgegradle = "7.0.34" # https://github.com/MinecraftForge/ForgeGradle +minecraft-forgerenamer = "1.1.7" # https://github.com/MinecraftForge/renamer minecraft-forgeversion = "1.20.1-47.4.12" # https://github.com/MinecraftForge/MinecraftForge -minecraft-kyori = "5.1.1" # https://github.com/KyoriPowered/adventure +minecraft-kyori = "5.2.0" # https://github.com/KyoriPowered/adventure minecraft-luckperms = "5.5" # https://github.com/LuckPerms/LuckPerms minecraft-mcprotocollib = "26.1-SNAPSHOT" # https://github.com/GeyserMC/MCProtocolLib minecraft-mockbukkit = "4.113.2" # https://github.com/MockBukkit/MockBukkit @@ -52,14 +52,14 @@ minecraft-neoforged-bus = "8.0.5" # https://github.com/neoforged/Bus minecraft-neoforgegradle = "7.1.38" # https://github.com/neoforged/NeoGradle minecraft-neoforgeversion = "21.1.129" # https://github.com/neoforged/NeoForge minecraft-packetevents = "2.13.0" # https://github.com/retrooper/packetevents -minecraft-papi = "2.12.2" # https://github.com/PlaceholderAPI/PlaceholderAPI +minecraft-papi = "2.12.3" # https://github.com/PlaceholderAPI/PlaceholderAPI minecraft-protocollib = "5.4.0" # https://github.com/dmulloy2/ProtocolLib minecraft-spigot = "26.1.2.build.+" # https://www.spigotmc.org minecraft-vault = "1.7.1" # https://github.com/MilkBowl/VaultAPI -minecraft-velocity = "3.5.0-SNAPSHOT" # https://github.com/PaperMC/Velocity -telegrambots = "10.0.0" # https://github.com/rubenlagus/TelegramBots -tests-junit-bom = "6.1.0" # https://github.com/junit-team/junit5 -tests-junit-jupiter-api = "6.1.0" # https://github.com/junit-team/junit5 +minecraft-velocity = "4.1.0-SNAPSHOT" # https://github.com/PaperMC/Velocity +telegrambots = "10.2.0" # https://github.com/rubenlagus/TelegramBots +tests-junit-bom = "6.1.3" # https://github.com/junit-team/junit5 +tests-junit-jupiter-api = "6.1.3" # https://github.com/junit-team/junit5 tests-mockito = "5.23.0" # https://github.com/mockito/mockito tests-org-testing = "7.12.0" # https://github.com/testng-team/testng tests-turbine = "1.2.1" # https://github.com/cashapp/turbine @@ -104,9 +104,9 @@ ktor-serialization-json = { module = "io.ktor:ktor-serialization-kotlinx-json", minecraft-astralibs-command = { module = "ru.astrainteractive.astralibs:command", version.ref = "minecraft-astralibs" } minecraft-astralibs-command-bukkit = { module = "ru.astrainteractive.astralibs:command-bukkit", version.ref = "minecraft-astralibs" } minecraft-astralibs-core = { module = "ru.astrainteractive.astralibs:core", version.ref = "minecraft-astralibs" } -minecraft-astralibs-core-minecraft = { module = "ru.astrainteractive.astralibs:core-minecraft", version.ref = "minecraft-astralibs" } minecraft-astralibs-core-bukkit = { module = "ru.astrainteractive.astralibs:core-bukkit", version.ref = "minecraft-astralibs" } minecraft-astralibs-core-forge = { module = "ru.astrainteractive.astralibs:core-forge", version.ref = "minecraft-astralibs" } +minecraft-astralibs-core-minecraft = { module = "ru.astrainteractive.astralibs:core-minecraft", version.ref = "minecraft-astralibs" } minecraft-astralibs-core-neoforge = { module = "ru.astrainteractive.astralibs:core-neoforge", version.ref = "minecraft-astralibs" } minecraft-astralibs-exposed = { module = "ru.astrainteractive.astralibs:exposed", version.ref = "minecraft-astralibs" } minecraft-astralibs-menu-bukkit = { module = "ru.astrainteractive.astralibs:menu-bukkit", version.ref = "minecraft-astralibs" } @@ -157,20 +157,20 @@ tests-turbine = { module = "app.cash.turbine:turbine", version.ref = "tests-turb [plugins] gradle-buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "gradle-buildconfig" } gradle-fabric-loom = { id = "fabric-loom", version.ref = "minecraft-fabric-loom" } -gradle-forgegradle = { id = "net.minecraftforge.gradle", version.ref = "minecraft-forgegradle" } gradle-forge-jarjar = { id = "net.minecraftforge.jarjar", version.ref = "minecraft-forge-jarjar" } +gradle-forgegradle = { id = "net.minecraftforge.gradle", version.ref = "minecraft-forgegradle" } gradle-forgerenamer = { id = "net.minecraftforge.renamer", version.ref = "minecraft-forgerenamer" } gradle-ftp = { id = "ru.astrainteractive.ftpplugin.gradleftp", version.ref = "gradle-ftp" } gradle-neoforgegradle = { id = "net.neoforged.gradle.userdev", version.ref = "minecraft-neoforgegradle" } gradle-shadow = { id = "com.gradleup.shadow", version.ref = "gradle-shadow" } -klibs-gradle-minecraft-platform = { id = "ru.astrainteractive.gradleplugin.minecraft.platform", version.ref = "klibs-gradleplugin" } klibs-gradle-detekt = { id = "ru.astrainteractive.gradleplugin.detekt", version.ref = "klibs-gradleplugin" } klibs-gradle-detekt-compose = { id = "ru.astrainteractive.gradleplugin.detekt.compose", version.ref = "klibs-gradleplugin" } -klibs-gradle-dokka-root = { id = "ru.astrainteractive.gradleplugin.dokka.root", version.ref = "klibs-gradleplugin" } +klibs-gradle-dokka = { id = "ru.astrainteractive.gradleplugin.dokka", version.ref = "klibs-gradleplugin" } klibs-gradle-java-core = { id = "ru.astrainteractive.gradleplugin.java.core", version.ref = "klibs-gradleplugin" } klibs-gradle-java-version = { id = "ru.astrainteractive.gradleplugin.java.version", version.ref = "klibs-gradleplugin" } klibs-gradle-minecraft-empty = { id = "ru.astrainteractive.gradleplugin.minecraft.empty", version.ref = "klibs-gradleplugin" } klibs-gradle-minecraft-multiplatform = { id = "ru.astrainteractive.gradleplugin.minecraft.multiplatform", version.ref = "klibs-gradleplugin" } +klibs-gradle-minecraft-platform = { id = "ru.astrainteractive.gradleplugin.minecraft.platform", version.ref = "klibs-gradleplugin" } klibs-gradle-publication = { id = "ru.astrainteractive.gradleplugin.publication", version.ref = "klibs-gradleplugin" } klibs-gradle-rootinfo = { id = "ru.astrainteractive.gradleplugin.rootinfo", version.ref = "klibs-gradleplugin" } klibs-gradle-stub-javadoc = { id = "ru.astrainteractive.gradleplugin.stub.javadoc", version.ref = "klibs-gradleplugin" } @@ -178,7 +178,6 @@ klibs-minecraft-resource-processor = { id = "ru.astrainteractive.gradleplugin.mi klibs-minecraft-shadow = { id = "ru.astrainteractive.gradleplugin.minecraft.shadow", version.ref = "klibs-gradleplugin" } kotlin-allopen = { id = "org.jetbrains.kotlin.plugin.allopen", version.ref = "kotlin-version" } kotlin-benchmark = { id = "org.jetbrains.kotlinx.benchmark", version.ref = "kotlin-benchmark" } -kotlin-gradle = { id = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin-version" } kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-version" } kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin-version" } -kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin-version" } \ No newline at end of file +kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin-version" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 78059c9c..df98956f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.0-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --git a/instances/bukkit/build.gradle.kts b/instances/bukkit/build.gradle.kts index 19baf26b..c728f0b2 100644 --- a/instances/bukkit/build.gradle.kts +++ b/instances/bukkit/build.gradle.kts @@ -68,80 +68,10 @@ val shadowJar by tasks.getting(ShadowJar::class) { dependencies { // Dependencies exclude(dependency("org.jetbrains:annotations")) - exclude("ch/qos/logback/**") - exclude("com/ibm/icu/**") - exclude("it/unimi/dsi/**") - exclude("javax/**") - exclude("mozilla/**") - exclude("org/apache/batik/**") - exclude("org/apache/commons/logging/**") - exclude("org/apache/xmlgraphics/**") - exclude("org/intellij/lang/annotations/**") - exclude("org/jetbrains/annotations/**") - exclude("org/slf4j/**") - exclude("org/w3c/dom/**") - exclude("org/jspecify/annotations/**") - // Root - if (project.name == "forge" || project.name == "neoforge") { - exclude("kotlin/**") // Use kotlin-neoforge or kotlin-forge - } - exclude("_COROUTINE/**") - exclude("DebugProbesKt.bin") - exclude("jetty-dir.css") - exclude("license/**") - exclude("**LICENCE**") - exclude("**LICENSE**") - // Other dependencies - exclude("club/minnced/opus/**") - exclude("com/google/**") - exclude("com/ibm/icu/**") - exclude("com/sun/**") - exclude("google/protobuf/**") - exclude("io/javalin/**") - exclude("jakarta/servlet/**") - exclude("javax/annotation/**") - exclude("javax/servlet/**") - exclude("natives/**") - exclude("net/luckperms/**") - exclude("nl/altindag/**") - exclude("org/bouncycastle/**") - exclude("org/checkerframework/**") - exclude("org/conscrypt/**") - exclude("org/apache/batik/**") - exclude("org/apache/xmlgraphics/**") - exclude("org/apache/xmlcommons/**") - exclude("org/eclipse/**") - exclude("jdk/xml/**") - exclude("org/w3c/**") - exclude("tomp2p/opuswrapper/**") - exclude("org/slf4j/**") - exclude("javax/xml/**") - exclude("org/xml/**") - // META - exclude("META-INF/**.md") - exclude("META-INF/**.MD") - exclude("META-INF/**.txt**") - exclude("META-INF/**LICENCE**") - exclude("META-INF/com.android.tools/**") - exclude("META-INF/gradle-plugins/**") - exclude("META-INF/imports/**") - if (project.name == "forge") { - exclude("META-INF/kotlin-reflection.kotlin_module") // Don't exclude on: forge] - } - exclude("META-INF/license/**") - exclude("META-INF/maven/**") - exclude("META-INF/native-image/**") - exclude("META-INF/native/**") - exclude("META-INF/proguard/**") - exclude("META-INF/rewrite/**") - if (project.name == "forge") { - exclude("META-INF/services/kotlin.reflect.**") // Don't exclude on: [*] - } - if (project.name != "forge") { - exclude("META-INF/versions/**") // Don't remove in: [forge] - } - // DEPENDENCIES - if (project.name == "bukkit") { + } + // DEPENDENCIES + if (project.name == "bukkit") { + dependencies { exclude(dependency("com.fasterxml.jackson.core:.*")) exclude(dependency("com.google.code.gson:.*")) exclude(dependency("com.google.crypto.tink:.*")) @@ -160,6 +90,78 @@ val shadowJar by tasks.getting(ShadowJar::class) { exclude(dependency("org.xerial:sqlite-jdbc")) } } + exclude("ch/qos/logback/**") + exclude("com/ibm/icu/**") + exclude("it/unimi/dsi/**") + exclude("javax/**") + exclude("mozilla/**") + exclude("org/apache/batik/**") + exclude("org/apache/commons/logging/**") + exclude("org/apache/xmlgraphics/**") + exclude("org/intellij/lang/annotations/**") + exclude("org/jetbrains/annotations/**") + exclude("org/slf4j/**") + exclude("org/w3c/dom/**") + exclude("org/jspecify/annotations/**") + // Root + if (project.name == "forge" || project.name == "neoforge") { + exclude("kotlin/**") // Use kotlin-neoforge or kotlin-forge + } + exclude("_COROUTINE/**") + exclude("DebugProbesKt.bin") + exclude("jetty-dir.css") + exclude("license/**") + exclude("**LICENCE**") + exclude("**LICENSE**") + // Other dependencies + exclude("club/minnced/opus/**") + exclude("com/google/**") + exclude("com/ibm/icu/**") + exclude("com/sun/**") + exclude("google/protobuf/**") + exclude("io/javalin/**") + exclude("jakarta/servlet/**") + exclude("javax/annotation/**") + exclude("javax/servlet/**") + exclude("natives/**") + exclude("net/luckperms/**") + exclude("nl/altindag/**") + exclude("org/bouncycastle/**") + exclude("org/checkerframework/**") + exclude("org/conscrypt/**") + exclude("org/apache/batik/**") + exclude("org/apache/xmlgraphics/**") + exclude("org/apache/xmlcommons/**") + exclude("org/eclipse/**") + exclude("jdk/xml/**") + exclude("org/w3c/**") + exclude("tomp2p/opuswrapper/**") + exclude("org/slf4j/**") + exclude("javax/xml/**") + exclude("org/xml/**") + // META + exclude("META-INF/**.md") + exclude("META-INF/**.MD") + exclude("META-INF/**.txt**") + exclude("META-INF/**LICENCE**") + exclude("META-INF/com.android.tools/**") + exclude("META-INF/gradle-plugins/**") + exclude("META-INF/imports/**") + if (project.name == "forge") { + exclude("META-INF/kotlin-reflection.kotlin_module") // Don't exclude on: forge] + } + exclude("META-INF/license/**") + exclude("META-INF/maven/**") + exclude("META-INF/native-image/**") + exclude("META-INF/native/**") + exclude("META-INF/proguard/**") + exclude("META-INF/rewrite/**") + if (project.name == "forge") { + exclude("META-INF/services/kotlin.reflect.**") // Don't exclude on: [*] + } + if (project.name != "forge") { + exclude("META-INF/versions/**") // Don't remove in: [forge] + } relocate("org.bstats", requireProjectInfo.group) // Be sure to relocate EXACT PACKAGES!! diff --git a/instances/forge/build.gradle.kts b/instances/forge/build.gradle.kts index 18add86b..1b4cc6e2 100644 --- a/instances/forge/build.gradle.kts +++ b/instances/forge/build.gradle.kts @@ -87,83 +87,10 @@ val shadowJar by tasks.getting(ShadowJar::class) { dependencies { // Dependencies exclude(dependency("org.jetbrains:annotations")) - exclude("ch/qos/logback/**") - exclude("com/ibm/icu/**") - exclude("it/unimi/dsi/**") - exclude("javax/**") - exclude("mozilla/**") - exclude("org/apache/batik/**") - exclude("org/apache/commons/logging/**") - exclude("org/apache/xmlgraphics/**") - exclude("org/intellij/lang/annotations/**") - exclude("org/jetbrains/annotations/**") - exclude("org/slf4j/**") - exclude("org/w3c/dom/**") - exclude("org/jspecify/annotations/**") - // Root - if (project.name == "forge" || project.name == "neoforge") { - exclude("kotlin/**") // Use kotlin-neoforge or kotlin-forge - } - exclude("_COROUTINE/**") - exclude("DebugProbesKt.bin") - exclude("jetty-dir.css") - exclude("license/**") - exclude("**LICENCE**") - exclude("**LICENSE**") - // Other dependencies - exclude("club/minnced/opus/**") - exclude("com/google/**") - exclude("com/ibm/icu/**") - exclude("com/sun/**") - exclude("google/protobuf/**") - exclude("io/javalin/**") - exclude("jakarta/servlet/**") - exclude("javax/annotation/**") - exclude("javax/servlet/**") - exclude("natives/**") - exclude("net/luckperms/**") - exclude("nl/altindag/**") - exclude("org/bouncycastle/**") - exclude("org/checkerframework/**") - exclude("org/conscrypt/**") - exclude("org/apache/batik/**") - exclude("org/apache/xmlgraphics/**") - exclude("org/apache/xmlcommons/**") - exclude("org/eclipse/**") - exclude("jdk/xml/**") - exclude("org/w3c/**") - exclude("tomp2p/opuswrapper/**") - exclude("org/slf4j/**") - exclude("javax/xml/**") - exclude("org/xml/**") - if (project.name == "forge") { - exclude("org/sqlite/**") // Place jdbc in mods folder - } - // META - exclude("META-INF/**.md") - exclude("META-INF/**.MD") - exclude("META-INF/**.txt**") - exclude("META-INF/**LICENCE**") - exclude("META-INF/com.android.tools/**") - exclude("META-INF/gradle-plugins/**") - exclude("META-INF/imports/**") - if (project.name == "forge") { - exclude("META-INF/kotlin-reflection.kotlin_module") // Don't exclude on: forge] - } - exclude("META-INF/license/**") - exclude("META-INF/maven/**") - exclude("META-INF/native-image/**") - exclude("META-INF/native/**") - exclude("META-INF/proguard/**") - exclude("META-INF/rewrite/**") - if (project.name == "forge") { - exclude("META-INF/services/kotlin.reflect.**") // Don't exclude on: [*] - } - if (project.name != "forge") { - exclude("META-INF/versions/**") // Don't remove in: [forge] - } - // DEPENDENCIES - if (project.name == "bukkit") { + } + // DEPENDENCIES + if (project.name == "bukkit") { + dependencies { exclude(dependency("com.fasterxml.jackson.core:.*")) exclude(dependency("com.google.code.gson:.*")) exclude(dependency("com.google.crypto.tink:.*")) @@ -182,6 +109,81 @@ val shadowJar by tasks.getting(ShadowJar::class) { exclude(dependency("org.xerial:sqlite-jdbc")) } } + exclude("ch/qos/logback/**") + exclude("com/ibm/icu/**") + exclude("it/unimi/dsi/**") + exclude("javax/**") + exclude("mozilla/**") + exclude("org/apache/batik/**") + exclude("org/apache/commons/logging/**") + exclude("org/apache/xmlgraphics/**") + exclude("org/intellij/lang/annotations/**") + exclude("org/jetbrains/annotations/**") + exclude("org/slf4j/**") + exclude("org/w3c/dom/**") + exclude("org/jspecify/annotations/**") + // Root + if (project.name == "forge" || project.name == "neoforge") { + exclude("kotlin/**") // Use kotlin-neoforge or kotlin-forge + } + exclude("_COROUTINE/**") + exclude("DebugProbesKt.bin") + exclude("jetty-dir.css") + exclude("license/**") + exclude("**LICENCE**") + exclude("**LICENSE**") + // Other dependencies + exclude("club/minnced/opus/**") + exclude("com/google/**") + exclude("com/ibm/icu/**") + exclude("com/sun/**") + exclude("google/protobuf/**") + exclude("io/javalin/**") + exclude("jakarta/servlet/**") + exclude("javax/annotation/**") + exclude("javax/servlet/**") + exclude("natives/**") + exclude("net/luckperms/**") + exclude("nl/altindag/**") + exclude("org/bouncycastle/**") + exclude("org/checkerframework/**") + exclude("org/conscrypt/**") + exclude("org/apache/batik/**") + exclude("org/apache/xmlgraphics/**") + exclude("org/apache/xmlcommons/**") + exclude("org/eclipse/**") + exclude("jdk/xml/**") + exclude("org/w3c/**") + exclude("tomp2p/opuswrapper/**") + exclude("org/slf4j/**") + exclude("javax/xml/**") + exclude("org/xml/**") + if (project.name == "forge") { + exclude("org/sqlite/**") // Place jdbc in mods folder + } + // META + exclude("META-INF/**.md") + exclude("META-INF/**.MD") + exclude("META-INF/**.txt**") + exclude("META-INF/**LICENCE**") + exclude("META-INF/com.android.tools/**") + exclude("META-INF/gradle-plugins/**") + exclude("META-INF/imports/**") + if (project.name == "forge") { + exclude("META-INF/kotlin-reflection.kotlin_module") // Don't exclude on: forge] + } + exclude("META-INF/license/**") + exclude("META-INF/maven/**") + exclude("META-INF/native-image/**") + exclude("META-INF/native/**") + exclude("META-INF/proguard/**") + exclude("META-INF/rewrite/**") + if (project.name == "forge") { + exclude("META-INF/services/kotlin.reflect.**") // Don't exclude on: [*] + } + if (project.name != "forge") { + exclude("META-INF/versions/**") // Don't remove in: [forge] + } relocate("org.bstats", requireProjectInfo.group) // Be sure to relocate EXACT PACKAGES!! diff --git a/instances/neoforge/build.gradle.kts b/instances/neoforge/build.gradle.kts index c7105a41..b108c709 100644 --- a/instances/neoforge/build.gradle.kts +++ b/instances/neoforge/build.gradle.kts @@ -71,58 +71,58 @@ val shadowJar by tasks.getting(ShadowJar::class) { dependencies { // Dependencies exclude(dependency("org.jetbrains:annotations")) - // Root -// exclude("kotlin/**") // Use kotlin-neoforge or kotlin-forge - exclude("_COROUTINE/**") - exclude("DebugProbesKt.bin") - exclude("jetty-dir.css") - exclude("license/**") - exclude("**LICENCE**") - exclude("**LICENSE**") - // Other dependencies - exclude("club/minnced/opus/**") - exclude("com/google/**") - exclude("com/ibm/icu/**") - exclude("com/sun/**") - exclude("google/protobuf/**") - exclude("io/javalin/**") - exclude("jakarta/servlet/**") - exclude("javax/annotation/**") - exclude("javax/servlet/**") - exclude("natives/**") - exclude("net/luckperms/**") - exclude("nl/altindag/**") - exclude("org/bouncycastle/**") - exclude("org/checkerframework/**") - exclude("org/conscrypt/**") - exclude("org/apache/batik/**") - exclude("org/apache/xmlgraphics/**") - exclude("org/apache/xmlcommons/**") - exclude("org/eclipse/**") - exclude("jdk/xml/**") - exclude("org/w3c/**") - exclude("tomp2p/opuswrapper/**") - exclude("org/slf4j/**") - exclude("javax/xml/**") - exclude("org/xml/**") - // META - exclude("META-INF/**.md") - exclude("META-INF/**.MD") - exclude("META-INF/**.txt**") - exclude("META-INF/**LICENCE**") - exclude("META-INF/com.android.tools/**") - exclude("META-INF/gradle-plugins/**") - exclude("META-INF/imports/**") - exclude("META-INF/kotlin-reflection.kotlin_module") - exclude("META-INF/license/**") - exclude("META-INF/maven/**") - exclude("META-INF/native-image/**") - exclude("META-INF/native/**") - exclude("META-INF/proguard/**") - exclude("META-INF/rewrite/**") - exclude("META-INF/services/kotlin.reflect.**") -// exclude("META-INF/versions/**") // Don't remove in Forge } + // Root +// exclude("kotlin/**") // Use kotlin-neoforge or kotlin-forge + exclude("_COROUTINE/**") + exclude("DebugProbesKt.bin") + exclude("jetty-dir.css") + exclude("license/**") + exclude("**LICENCE**") + exclude("**LICENSE**") + // Other dependencies + exclude("club/minnced/opus/**") + exclude("com/google/**") + exclude("com/ibm/icu/**") + exclude("com/sun/**") + exclude("google/protobuf/**") + exclude("io/javalin/**") + exclude("jakarta/servlet/**") + exclude("javax/annotation/**") + exclude("javax/servlet/**") + exclude("natives/**") + exclude("net/luckperms/**") + exclude("nl/altindag/**") + exclude("org/bouncycastle/**") + exclude("org/checkerframework/**") + exclude("org/conscrypt/**") + exclude("org/apache/batik/**") + exclude("org/apache/xmlgraphics/**") + exclude("org/apache/xmlcommons/**") + exclude("org/eclipse/**") + exclude("jdk/xml/**") + exclude("org/w3c/**") + exclude("tomp2p/opuswrapper/**") + exclude("org/slf4j/**") + exclude("javax/xml/**") + exclude("org/xml/**") + // META + exclude("META-INF/**.md") + exclude("META-INF/**.MD") + exclude("META-INF/**.txt**") + exclude("META-INF/**LICENCE**") + exclude("META-INF/com.android.tools/**") + exclude("META-INF/gradle-plugins/**") + exclude("META-INF/imports/**") + exclude("META-INF/kotlin-reflection.kotlin_module") + exclude("META-INF/license/**") + exclude("META-INF/maven/**") + exclude("META-INF/native-image/**") + exclude("META-INF/native/**") + exclude("META-INF/proguard/**") + exclude("META-INF/rewrite/**") + exclude("META-INF/services/kotlin.reflect.**") +// exclude("META-INF/versions/**") // Don't remove in Forge // Be sure to relocate EXACT PACKAGES!! // For example, relocate org.some.package instead of org From 5377796e390feba9bed836fd5d1f9e90260d98a1 Mon Sep 17 00:00:00 2001 From: Roman Makeev Date: Mon, 24 Aug 2026 00:26:36 +0300 Subject: [PATCH 2/3] [FIX] Fix gradle neoforge --- instances/neoforge/build.gradle.kts | 11 +++++++++++ modules/core/neoforge/build.gradle.kts | 6 ++++++ modules/event/neoforge/build.gradle.kts | 6 ++++++ modules/service/neoforge/build.gradle.kts | 6 ++++++ 4 files changed, 29 insertions(+) diff --git a/instances/neoforge/build.gradle.kts b/instances/neoforge/build.gradle.kts index b108c709..b5d1bf30 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 { @@ -176,3 +177,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 a0acfd8d..ff4ecbcc 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") @@ -34,3 +36,7 @@ dependencies { compileOnly(libs.minecraft.neoforged.bus) compileOnly(libs.minecraft.neoforgeversion) } + +tasks.withType().configureEach { + dependsOn(":instances:neoforge:generateNeoforgeJar") +} diff --git a/modules/event/neoforge/build.gradle.kts b/modules/event/neoforge/build.gradle.kts index 75c58af2..a725a72b 100644 --- a/modules/event/neoforge/build.gradle.kts +++ b/modules/event/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/service/neoforge/build.gradle.kts b/modules/service/neoforge/build.gradle.kts index 16ac370f..fee7a11a 100644 --- a/modules/service/neoforge/build.gradle.kts +++ b/modules/service/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") @@ -44,3 +46,7 @@ dependencies { compileOnly(libs.minecraft.neoforged.bus) compileOnly(libs.minecraft.neoforgeversion) } + +tasks.withType().configureEach { + dependsOn(":instances:neoforge:generateNeoforgeJar") +} From 2ac0d9d3c7e6ca043ba6f000e50975fc8f6088e9 Mon Sep 17 00:00:00 2001 From: Roman Makeev Date: Mon, 24 Aug 2026 10:40:34 +0300 Subject: [PATCH 3/3] [FIX] Fix NeoForge run --- gradle/libs.versions.toml | 6 +++--- instances/neoforge/build.gradle.kts | 17 +++++++++++------ instances/neoforge/gradle.properties | 2 ++ settings.gradle.kts | 2 ++ 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8b0781a2..03b59712 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -16,7 +16,7 @@ jda = "6.5.0" # https://github.com/discord-jda/JDA jda-webhook = "0.8.4" # https://github.com/MinnDevelopment/discord-webhooks jmh-core = "1.37" # https://github.com/openjdk/jmh joml = "1.10.9" # https://github.com/JOML-CI/JOML -klibs-gradleplugin = "2.7.1" # https://github.com/makeevrserg/gradle-plugin +klibs-gradleplugin = "2.7.2" # https://github.com/makeevrserg/gradle-plugin klibs-kstorage = "5.3.1" # https://github.com/makeevrserg/klibs.kstorage klibs-mikro = "1.28.1" # https://github.com/makeevrserg/klibs.mikro kotlin-benchmark = "0.4.17" # https://github.com/Kotlin/kotlinx-benchmark @@ -26,7 +26,7 @@ kotlin-serialization = "1.11.0" # https://github.com/kotlin/kotlinx.serializatio kotlin-serialization-kaml = "0.104.0" # https://github.com/charleskorn/kaml kotlin-version = "2.4.10" # https://github.com/jetbrains/kotlin ktor = "3.5.2" # https://github.com/ktorio/ktor -minecraft-astralibs = "3.43.1" # https://github.com/Astra-Interactive/AstraLibs +minecraft-astralibs = "3.44.0" # https://github.com/Astra-Interactive/AstraLibs minecraft-authlib = "6.0.54" # https://mvnrepository.com/artifact/com.mojang/authlib minecraft-brigadier = "1.3.10" # https://github.com/Mojang/brigadier minecraft-bstats = "3.2.1" # https://github.com/Bastian/bStats-Metrics @@ -50,7 +50,7 @@ minecraft-mockbukkit = "4.113.2" # https://github.com/MockBukkit/MockBukkit minecraft-mojang-version = "1.20.1" # https://www.minecraft.net minecraft-neoforged-bus = "8.0.5" # https://github.com/neoforged/Bus minecraft-neoforgegradle = "7.1.38" # https://github.com/neoforged/NeoGradle -minecraft-neoforgeversion = "21.1.129" # https://github.com/neoforged/NeoForge +minecraft-neoforgeversion = "21.1.248" # https://github.com/neoforged/NeoForge minecraft-packetevents = "2.13.0" # https://github.com/retrooper/packetevents minecraft-papi = "2.12.3" # https://github.com/PlaceholderAPI/PlaceholderAPI minecraft-protocollib = "5.4.0" # https://github.com/dmulloy2/ProtocolLib diff --git a/instances/neoforge/build.gradle.kts b/instances/neoforge/build.gradle.kts index b5d1bf30..06a872d9 100644 --- a/instances/neoforge/build.gradle.kts +++ b/instances/neoforge/build.gradle.kts @@ -43,11 +43,16 @@ dependencies { } minecraftProcessResource { + // NeoForge versions as MC_MINOR.MC_PATCH.BUILD: 21.1.129 targets Minecraft 1.21.1 + val neoForgeMinecraftVersion = "1." + libs.versions.minecraft.neoforgeversion.get() + .split(".") + .take(2) + .joinToString(".") neoForge( customProperties = mapOf( - "minecraft_version" to libs.versions.minecraft.mojang.version.get(), - "minecraft_version_range" to listOf(libs.versions.minecraft.mojang.version.get()) - .joinToString(","), + "minecraft_version" to neoForgeMinecraftVersion, + "minecraft_version_range" to neoForgeMinecraftVersion, + "mod_license" to "MIT License", "neo_version" to "neo_version", "neo_version_range" to "[${libs.versions.minecraft.neoforgeversion.get()},)", ) @@ -115,14 +120,14 @@ val shadowJar by tasks.getting(ShadowJar::class) { exclude("META-INF/com.android.tools/**") exclude("META-INF/gradle-plugins/**") exclude("META-INF/imports/**") - exclude("META-INF/kotlin-reflection.kotlin_module") exclude("META-INF/license/**") exclude("META-INF/maven/**") exclude("META-INF/native-image/**") exclude("META-INF/native/**") exclude("META-INF/proguard/**") exclude("META-INF/rewrite/**") - exclude("META-INF/services/kotlin.reflect.**") + // Keep META-INF/services/kotlin.reflect.** - kotlin-reflect is bundled here and + // Exposed fails with "No MetadataExtensions instances found" without its services. // exclude("META-INF/versions/**") // Don't remove in Forge // Be sure to relocate EXACT PACKAGES!! @@ -162,7 +167,7 @@ val shadowJar by tasks.getting(ShadowJar::class) { "org.json", "org.json", // "org.slf4j", // Is present - "org.sqlite", +// "org.sqlite", // JNI binds to org.sqlite.core.NativeDB - do not relocate "org.telegram", "org.telegram.telegrambots", "org.w3c.css", diff --git a/instances/neoforge/gradle.properties b/instances/neoforge/gradle.properties index 4de3651a..6b16e712 100644 --- a/instances/neoforge/gradle.properties +++ b/instances/neoforge/gradle.properties @@ -1 +1,3 @@ klibs.java.source=21 +klibs.java.ktarget=21 +kotlin.jvm.target.validation.mode=warning diff --git a/settings.gradle.kts b/settings.gradle.kts index 4315500e..779a4ec9 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,6 @@ pluginManagement { repositories { + mavenLocal() maven("https://maven.neoforged.net/releases") maven("https://maven.minecraftforge.net") maven("https://files.minecraftforge.net/maven") @@ -19,6 +20,7 @@ buildscript { dependencyResolutionManagement { repositories { + mavenLocal() gradlePluginPortal() mavenCentral() maven("https://maven.minecraftforge.net/")