diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml deleted file mode 100644 index 5390ef9..0000000 --- a/.github/workflows/beta.yml +++ /dev/null @@ -1,28 +0,0 @@ -on: - push: - branches: - - master - - main -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@main - - name: Set up JDK 17 - uses: actions/setup-java@v1 - with: - java-version: 17 - - name: Change wrapper permissions - run: chmod +x ./gradlew - - name: Upload to Discord - run: ./gradlew discord --stacktrace - if: | - !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.pull_request.title, '[ci skip]') - env: - discord_webhook: ${{ secrets.DISCORD_WEBHOOK }} - action_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - - name: Capture build artifacts - uses: actions/upload-artifact@v2 - with: - name: Artifacts - path: build/libs/ \ No newline at end of file diff --git a/.github/workflows/discord_publish.yml b/.github/workflows/publish.yml similarity index 82% rename from .github/workflows/discord_publish.yml rename to .github/workflows/publish.yml index 8845b02..116f22f 100644 --- a/.github/workflows/discord_publish.yml +++ b/.github/workflows/publish.yml @@ -14,21 +14,21 @@ jobs: - uses: actions/checkout@main - name: Fetch tags run: git fetch --tags - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v1 with: - java-version: 17 + java-version: 21 - name: Upload to websites run: ./gradlew publishThirdParty --stacktrace -PlastTag="v${{ github.event.inputs.previousVersion }}" -PcurrentTag="v${{ github.event.inputs.version }}" if: | !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.pull_request.title, '[ci skip]') env: modrinth_token: ${{ secrets.MODRINTH_TOKEN }} - curseforge_token: ${{ secrets.CURSEFORGE_TOKEN }} github_token: ${{ secrets.GH_API_KEY }} - discord_release_webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK }} + USERNAME: ${{ secrets.GH_USERNAME }} + TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Capture build artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: Artifacts path: build/libs/ \ No newline at end of file diff --git a/build.gradle b/build.gradle index 6524266..9fd76bc 100644 --- a/build.gradle +++ b/build.gradle @@ -1,23 +1,37 @@ plugins { - id 'fabric-loom' version '1.0-SNAPSHOT' + id 'fabric-loom' version '1.7.2' id 'maven-publish' - id "io.freefair.lombok" version "6.0.0-m2" + id "io.freefair.lombok" version "8.10" } -sourceCompatibility = JavaVersion.VERSION_16 -targetCompatibility = JavaVersion.VERSION_16 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} + +apply from: 'https://gist.githubusercontent.com/EnricoMessall/fb5de26a0ac26840060fd1ef45c32a5f/raw/cba2886a0fc2c95b24fc093684b4e6bfeafbd5ba/publish.gradle' + +sourceCompatibility = JavaVersion.VERSION_21 +targetCompatibility = JavaVersion.VERSION_21 archivesBaseName = project.archives_base_name version = "${project.minecraft_version}-${project.mod_version}" group = project.maven_group -apply from: 'https://raw.githubusercontent.com/DarkKronicle/GradleScripts/main/gradle/publish.gradle' - repositories { mavenCentral() mavenLocal() // only used to build the mod locally maven { url 'https://masa.dy.fi/maven' } maven { url 'https://jitpack.io' } + + maven { + url = uri("https://maven.pkg.github.com/Arematics/AdvancedChatCore") + credentials { + username = project.findProperty("gpr.user") ?: System.getenv("USERNAME") + password = project.findProperty("gpr.key") ?: System.getenv("TOKEN") + } + } } dependencies { @@ -25,16 +39,19 @@ dependencies { mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" - modImplementation "fi.dy.masa.malilib:malilib-fabric-1.20.2:${project.malilib_version}" - //modImplementation "com.github.DarkKronicle:AdvancedChatCore:${project.advancedchat_version}" - modImplementation "io.github.darkkronicle:AdvancedChatCore:1.20.4-1.5.10" // only used to build the mod locally + modImplementation "fi.dy.masa.malilib:malilib-fabric-1.21:${project.malilib_version}" + modImplementation "com.arematics:advancedchatcore:${project.advancedchat_version}" + + implementation "com.github.DarkKronicle.Konstruct:addons:${project.konstruct_version}" + implementation "com.github.DarkKronicle.Konstruct:core:${project.konstruct_version}" implementation 'org.openjdk.nashorn:nashorn-core:15.3' implementation 'org.javadelight:delight-nashorn-sandbox:0.2.5' include 'org.openjdk.nashorn:nashorn-core:15.3' include 'org.javadelight:delight-nashorn-sandbox:0.2.5' - include group: 'org.webjars.bower', name: 'js-beautify', version: '1.9.0' + include "com.github.DarkKronicle.Konstruct:addons:${project.konstruct_version}" + include "com.github.DarkKronicle.Konstruct:core:${project.konstruct_version}" } @@ -48,12 +65,11 @@ processResources { tasks.withType(JavaCompile).configureEach { it.options.encoding = "UTF-8" - it.options.release = 16 + it.options.release = 21 } -task sourcesJar(type: Jar, dependsOn: classes) { - classifier = "sources" - from sourceSets.main.allSource +java { + withSourcesJar() } jar { @@ -74,9 +90,8 @@ publishing { } } - // select the repositories you want to publish to + // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. repositories { - // uncomment to publish to the local maven - // mavenLocal() + } -} +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 4aab7cb..67c8622 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,28 +1,25 @@ -minecraft_version=1.20.4 -yarn_mappings=1.20.4+build.3 -loader_version=0.15.3 -fabric_api_version=0.92.0+1.20.4 +minecraft_version=1.21 +yarn_mappings=1.21+build.9 +loader_version=0.15.11 +fabric_api_version=0.100.1+1.21 +konstruct_version=2.0.3-build1 -mod_version=1.2.8 -maven_group=io.github.darkkronicle +mod_version=1.2.9-beta1 +maven_group=com.arematics archives_base_name=AdvancedChatFilters -malilib_version = 0.17.0 +malilib_version = 0.20.0 org.gradle.jvmargs=-Xmx1G -advancedchat_version=v1.5.10 +advancedchat_version=1.21-1.5.11-beta1 owo_version=2.0.0 -# publishing -curseforge_slug=advancedchatfilters -curseforge_id=539122 - -modrinth_slug=advancedchatfilters -modrinth_id=c6fx2vMe +modrinth_slug=advancedchatfilters-next +modrinth_id=wNgI7mfM # default_release_type can be stable, beta, or alpha default_release_type=stable project_name=AdvancedChatFilters -project_url=https://modrinth.com/mod/advancedchatfilters +project_url=https://modrinth.com/mod/advancedchatfilters-next project_logo=https://raw.githubusercontent.com/DarkKronicle/AdvancedChatFilters/main/src/main/resources/assets/advancedchatfilters/icon.png project_color=0x134bff changelog_hide_unimportant_commits=true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 7c08e4f..db4c326 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists \ No newline at end of file diff --git a/src/main/java/io/github/darkkronicle/advancedchatfilters/filters/processors/SoundProcessor.java b/src/main/java/io/github/darkkronicle/advancedchatfilters/filters/processors/SoundProcessor.java index 919b302..27e9f38 100644 --- a/src/main/java/io/github/darkkronicle/advancedchatfilters/filters/processors/SoundProcessor.java +++ b/src/main/java/io/github/darkkronicle/advancedchatfilters/filters/processors/SoundProcessor.java @@ -94,7 +94,7 @@ public IntRange getArgumentCount() { } public static SoundEvent getEvent(String name) { - return SoundEvent.of(new Identifier(name)); + return SoundEvent.of(Identifier.of(name)); } /* How the filter notifies the client of a found string. diff --git a/src/main/java/io/github/darkkronicle/advancedchatfilters/scripting/util/TextBuilder.java b/src/main/java/io/github/darkkronicle/advancedchatfilters/scripting/util/TextBuilder.java index 1d624a0..43add48 100644 --- a/src/main/java/io/github/darkkronicle/advancedchatfilters/scripting/util/TextBuilder.java +++ b/src/main/java/io/github/darkkronicle/advancedchatfilters/scripting/util/TextBuilder.java @@ -133,7 +133,7 @@ public TextBuilder setStrikethrough(boolean strikethrough) { */ public TextBuilder setFont(String namespace, String name) { // Dunno if this will do anything or how it works - applyStyle(style -> style.withFont(new Identifier(namespace, name))); + applyStyle(style -> style.withFont(Identifier.of(namespace, name))); return this; } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index a17f1ab..49df6b6 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -5,11 +5,13 @@ "name": "AdvancedChatFilters", "description": "Filters for AdvancedChat", "authors": [ - "DarkKronicle" + "DarkKronicle", + "EnricoMessall" ], "contact": { - "sources": "https://github.com/DarkKronicle/AdvancedChat", - "discord": "https://discord.gg/WnaE3uZxDA" + "homepage": "https://arematics.com", + "sources": "https://github.com/Arematics/AdvancedChatFilters", + "issues": "https://github.com/Arematics/AdvancedChatFilters/issues" }, "license": "MPL-v2", "icon": "assets/advancedchatfilters/icon.png", @@ -20,11 +22,11 @@ ] }, "depends": { - "fabricloader": ">=0.14.18", + "fabricloader": ">=0.15.11", "fabric": "*", - "minecraft": ">=1.20", - "malilib": ">=0.16.0", - "advancedchatcore": ">=1.5.10-1.19" + "minecraft": ">=1.21", + "malilib": ">=0.20.0", + "advancedchatcore": ">=1.5.11-1.21" }, "custom": { "acmodule": true,