diff --git a/.github/workflows/build.yml.disabled b/.github/workflows/build.yml.disabled deleted file mode 100644 index 4e1e001..0000000 --- a/.github/workflows/build.yml.disabled +++ /dev/null @@ -1,36 +0,0 @@ -name: build -on: - push: - branches: - - '**' - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - loader: [fabric, forge, neoforge] - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Validate gradle wrapper - uses: gradle/wrapper-validation-action@v1 - - name: Setup JDK - uses: actions/setup-java@v3 - with: - java-version: 21 - distribution: temurin - - name: Make gradle wrapper executable - run: chmod +x ./gradlew - - name: Build API - run: ./gradlew :kuma-api:${{ matrix.loader }}:build - env: - GPR_USERNAME: ${{secrets.GPR_USERNAME}} - GPR_TOKEN: ${{secrets.GPR_TOKEN}} - GPR_BUILD_NUMBER: ${{github.run_number}} - - name: Build - run: ./gradlew :kuma:${{ matrix.loader }}:build - env: - GPR_USERNAME: ${{secrets.GPR_USERNAME}} - GPR_TOKEN: ${{secrets.GPR_TOKEN}} - GPR_BUILD_NUMBER: ${{github.run_number}} \ No newline at end of file diff --git a/.github/workflows/publish-api-release.yml b/.github/workflows/publish-api-release.yml deleted file mode 100644 index cf1548c..0000000 --- a/.github/workflows/publish-api-release.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: publish-api-release -on: - workflow_dispatch: - inputs: - bump: - description: 'The bump in version for this release' - required: true - type: choice - default: patch - options: - - patch - -jobs: - create-release: - runs-on: ubuntu-latest - outputs: - ref: v${{ steps.bump-version.outputs.version }} - version: ${{ steps.bump-version.outputs.version }} - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Extracting version from properties - shell: bash - run: echo "version=$(cat kuma-api/gradle.properties | grep -w "\bversion" | cut -d= -f2)" >> $GITHUB_OUTPUT - id: extract-version - - name: Bumping version - uses: TwelveIterationMods/bump-version@v1 - with: - version: ${{ steps.extract-version.outputs.version }} - bump: ${{ inputs.bump }} - id: bump-version - - name: Updating version properties - run: | - sed -i "s/^\s*version\s*=.*/version = ${{ steps.bump-version.outputs.version }}/g" kuma-api/gradle.properties - git config user.name "GitHub Actions" - git config user.email "<>" - git commit -am "Set version to ${{ steps.bump-version.outputs.version }}" - git push origin ${BRANCH_NAME} - git tag -a "v${{ steps.bump-version.outputs.version }}" -m "Release ${{ steps.bump-version.outputs.version }}" - git push origin "v${{ steps.bump-version.outputs.version }}" - shell: bash - env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - publish-release: - runs-on: ubuntu-latest - permissions: - packages: write - strategy: - matrix: - loader: [ common, fabric, forge, neoforge ] - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - ref: ${{ needs.create-release.outputs.ref }} - - name: Validate gradle wrapper - uses: gradle/wrapper-validation-action@v1 - - name: Setup JDK - uses: actions/setup-java@v3 - with: - java-version: 21 - distribution: temurin - - name: Make gradle wrapper executable - run: chmod +x ./gradlew - - name: Publish API - run: ./gradlew :kuma-api:${{ matrix.loader }}:publish '-Pversion=${{needs.create-release.outputs.version}}' '-PtwelveIterationsNexusUsername=${{ secrets.NEXUS_USER }}' '-PtwelveIterationsNexusPassword=${{ secrets.NEXUS_PASSWORD }}' - needs: create-release \ No newline at end of file diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 9f578b1..68796a7 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v3 - name: Extracting version from properties shell: bash - run: echo "version=$(cat kuma/gradle.properties | grep -w "\bversion" | cut -d= -f2)" >> $GITHUB_OUTPUT + run: echo "version=$(cat gradle.properties | grep -w "\bversion" | cut -d= -f2)" >> $GITHUB_OUTPUT id: extract-version - name: Bumping version uses: TwelveIterationMods/bump-version@v1 @@ -33,7 +33,7 @@ jobs: id: bump-version - name: Updating version properties run: | - sed -i "s/^\s*version\s*=.*/version = ${{ steps.bump-version.outputs.version }}/g" kuma/gradle.properties + sed -i "s/^\s*version\s*=.*/version = ${{ steps.bump-version.outputs.version }}/g" gradle.properties git config user.name "GitHub Actions" git config user.email "<>" git commit -am "Set version to ${{ steps.bump-version.outputs.version }}" @@ -43,30 +43,6 @@ jobs: shell: bash env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - publish-release-api: - runs-on: ubuntu-latest - permissions: - packages: write - strategy: - matrix: - loader: [ common, fabric, forge, neoforge ] - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - ref: ${{ needs.create-release.outputs.ref }} - - name: Validate gradle wrapper - uses: gradle/wrapper-validation-action@v1 - - name: Setup JDK - uses: actions/setup-java@v3 - with: - java-version: 21 - distribution: temurin - - name: Make gradle wrapper executable - run: chmod +x ./gradlew - - name: Publish API - run: ./gradlew :kuma-api:${{ matrix.loader }}:publish '-Pversion=${{needs.create-release.outputs.version}}' '-PtwelveIterationsNexusUsername=${{ secrets.NEXUS_USER }}' '-PtwelveIterationsNexusPassword=${{ secrets.NEXUS_PASSWORD }}' - needs: create-release publish-release: runs-on: ubuntu-latest permissions: @@ -74,12 +50,7 @@ jobs: strategy: matrix: loader: [ common, fabric, forge, neoforge ] - site: [ curseforge, modrinth, publish ] - exclude: - - loader: common - site: curseforge - - loader: common - site: modrinth + site: [ publish ] steps: - name: Checkout repository uses: actions/checkout@v3 @@ -95,7 +66,7 @@ jobs: - name: Make gradle wrapper executable run: chmod +x ./gradlew - name: Publish - run: ./gradlew :kuma:${{ matrix.loader }}:${{ matrix.site }} '-Pversion=${{needs.create-release.outputs.version}}' '-PtwelveIterationsNexusUsername=${{ secrets.NEXUS_USER }}' '-PtwelveIterationsNexusPassword=${{ secrets.NEXUS_PASSWORD }}' + run: ./gradlew :${{ matrix.loader }}:${{ matrix.site }} '-Pversion=${{needs.create-release.outputs.version}}' '-PtwelveIterationsNexusUsername=${{ secrets.NEXUS_USER }}' '-PtwelveIterationsNexusPassword=${{ secrets.NEXUS_PASSWORD }}' env: CURSEFORGE_TOKEN: ${{secrets.CURSEFORGE_TOKEN}} MODRINTH_TOKEN: ${{secrets.MODRINTH_TOKEN}} diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml index e1b02ad..a23204f 100644 --- a/.github/workflows/publish-snapshot.yml +++ b/.github/workflows/publish-snapshot.yml @@ -25,27 +25,15 @@ jobs: distribution: temurin - name: Make gradle wrapper executable run: chmod +x ./gradlew - - name: Extracting API version from properties - shell: bash - run: echo "version=$(cat kuma-api/gradle.properties | grep -w "\bversion" | cut -d= -f2)" >> $GITHUB_OUTPUT - id: extract-api-version - name: Extracting version from properties shell: bash - run: echo "version=$(cat kuma/gradle.properties | grep -w "\bversion" | cut -d= -f2)" >> $GITHUB_OUTPUT + run: echo "version=$(cat gradle.properties | grep -w "\bversion" | cut -d= -f2)" >> $GITHUB_OUTPUT id: extract-version - - name: Bumping API version - uses: TwelveIterationMods/bump-version@v1 - with: - version: ${{ steps.extract-api-version.outputs.version }} - bump: patch - id: bump-api-version - name: Bumping version uses: TwelveIterationMods/bump-version@v1 with: version: ${{ steps.extract-version.outputs.version }} - bump: minor + bump: patch id: bump-version - - name: Publish API - run: ./gradlew :kuma-api:${{ matrix.loader }}:publish '-Pversion=${{ steps.bump-api-version.outputs.version }}-SNAPSHOT' '-PtwelveIterationsNexusUsername=${{ secrets.NEXUS_USER }}' '-PtwelveIterationsNexusPassword=${{ secrets.NEXUS_PASSWORD }}' - name: Publish - run: ./gradlew :kuma:${{ matrix.loader }}:publish '-Pversion=${{ steps.bump-version.outputs.version }}-SNAPSHOT' '-PtwelveIterationsNexusUsername=${{ secrets.NEXUS_USER }}' '-PtwelveIterationsNexusPassword=${{ secrets.NEXUS_PASSWORD }}' \ No newline at end of file + run: ./gradlew :${{ matrix.loader }}:publish '-Pversion=${{ steps.bump-version.outputs.version }}-SNAPSHOT' '-PtwelveIterationsNexusUsername=${{ secrets.NEXUS_USER }}' '-PtwelveIterationsNexusPassword=${{ secrets.NEXUS_PASSWORD }}' \ No newline at end of file diff --git a/buildSrc/src/main/groovy/multiloader-common.gradle b/buildSrc/src/main/groovy/multiloader-common.gradle index a4a0ed2..e3b394c 100644 --- a/buildSrc/src/main/groovy/multiloader-common.gradle +++ b/buildSrc/src/main/groovy/multiloader-common.gradle @@ -25,21 +25,21 @@ repositories { } } filter { includeGroupAndSubgroups("org.spongepowered") } - exclusiveContent { - forRepositories( - maven { - name = 'ParchmentMC' - url = 'https://maven.parchmentmc.org/' - }, - maven { - name = "NeoForge" - url = 'https://maven.neoforged.net/releases' - } - ) - filter { includeGroup('org.parchmentmc.data') } - } } maven { url "https://maven.twelveiterations.com/repository/maven-public/" } + exclusiveContent { + forRepositories( + maven { + name = 'ParchmentMC' + url = 'https://maven.parchmentmc.org/' + }, + maven { + name = "NeoForge" + url = 'https://maven.neoforged.net/releases' + } + ) + filter { includeGroup('org.parchmentmc.data') } + } } dependencies { @@ -50,8 +50,8 @@ dependencies { // Read more about capabilities here: https://docs.gradle.org/current/userguide/component_capabilities.html#sec:declaring-additional-capabilities-for-a-local-component ['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements'].each { variant -> configurations."$variant".outgoing { - capability("$group:${mod_id.replace('_', '-')}-${project.name}:$version") - capability("$group:${mod_id.replace('_', '-')}:$version") + capability("$group:$mod_id-${project.name}:$version") + capability("$group:$mod_id:$version") } publishing.publications.configureEach { suppressPomMetadataWarningsFor(variant) @@ -64,13 +64,6 @@ sourcesJar { } } -tasks.withType(Javadoc).tap { - configureEach { - failOnError false - options.addStringOption('Xdoclint:-missing', '-quiet') - } -} - jar { from(rootProject.file("LICENSE")) { rename { "${it}_${mod_name}" } @@ -93,7 +86,7 @@ jar { processResources { def expandProps = [ "version": version, - "group": project.group, + "group": project.group, //Else we target the task's group. "minecraft_version": minecraft_version, "minimum_minecraft_version": minimum_minecraft_version, "forge_version": forge_version, @@ -106,7 +99,7 @@ processResources { "mod_author": mod_author, "mod_id": mod_id, "license": license, - "description": description, + "description": project.description, "neoforge_version": neoforge_version, "neoforge_version_range": neoforge_version_range, "neoforge_loader_version_range": neoforge_loader_version_range, @@ -115,7 +108,7 @@ processResources { "pack_format_number": pack_format_number, "homepage": homepage, "issues": issues, - "sources": sources, + "sources": sources ] filesMatching(['pack.mcmeta', 'fabric.mod.json', 'META-INF/mods.toml', 'META-INF/neoforge.mods.toml', '*.mixins.json']) { @@ -128,8 +121,7 @@ publishing { publications { register('mavenJava', MavenPublication) { version = project.version + (!project.version.endsWith("SNAPSHOT") ? "+" + minecraft_version : "") - artifactId "${mod_id.replace('_', '-')}-${project.name}" - group = project.group + artifactId "${mod_id}-${project.name}" from components.java } } diff --git a/buildSrc/src/main/groovy/multiloader-loader.gradle b/buildSrc/src/main/groovy/multiloader-loader.gradle index 8894127..dc8ed7c 100644 --- a/buildSrc/src/main/groovy/multiloader-loader.gradle +++ b/buildSrc/src/main/groovy/multiloader-loader.gradle @@ -15,14 +15,14 @@ configurations { } dependencies { - compileOnly(project("${project.parent?.path}:common")) { + compileOnly(project(':common')) { capabilities { - requireCapability "$group:${mod_id.replace('_', '-')}" + requireCapability "$group:$mod_id" } } - commonJava project(path: "${project.parent?.path}:common", configuration: 'commonJava') - commonResources project(path: "${project.parent?.path}:common", configuration: 'commonResources') - commonGeneratedResources project(path: "${project.parent?.path}:common", configuration: 'commonGeneratedResources') + commonJava project(path: ':common', configuration: 'commonJava') + commonResources project(path: ':common', configuration: 'commonResources') + commonGeneratedResources project(path: ':common', configuration: 'commonGeneratedResources') } tasks.named('compileJava', JavaCompile) { diff --git a/kuma-api/common/build.gradle b/common/build.gradle similarity index 100% rename from kuma-api/common/build.gradle rename to common/build.gradle diff --git a/kuma-api/common/dependencies.gradle b/common/dependencies.gradle similarity index 100% rename from kuma-api/common/dependencies.gradle rename to common/dependencies.gradle diff --git a/kuma-api/common/src/main/java/net/blay09/mods/kuma/AbstractManagedKeyMapping.java b/common/src/main/java/net/blay09/mods/kuma/AbstractManagedKeyMapping.java similarity index 100% rename from kuma-api/common/src/main/java/net/blay09/mods/kuma/AbstractManagedKeyMapping.java rename to common/src/main/java/net/blay09/mods/kuma/AbstractManagedKeyMapping.java diff --git a/kuma-api/common/src/main/java/net/blay09/mods/kuma/AbstractManagedKeyMappingBuilder.java b/common/src/main/java/net/blay09/mods/kuma/AbstractManagedKeyMappingBuilder.java similarity index 100% rename from kuma-api/common/src/main/java/net/blay09/mods/kuma/AbstractManagedKeyMappingBuilder.java rename to common/src/main/java/net/blay09/mods/kuma/AbstractManagedKeyMappingBuilder.java diff --git a/kuma-api/common/src/main/java/net/blay09/mods/kuma/KumaRuntime.java b/common/src/main/java/net/blay09/mods/kuma/KumaRuntime.java similarity index 100% rename from kuma-api/common/src/main/java/net/blay09/mods/kuma/KumaRuntime.java rename to common/src/main/java/net/blay09/mods/kuma/KumaRuntime.java diff --git a/kuma-api/common/src/main/java/net/blay09/mods/kuma/KumaRuntimeFactory.java b/common/src/main/java/net/blay09/mods/kuma/KumaRuntimeFactory.java similarity index 100% rename from kuma-api/common/src/main/java/net/blay09/mods/kuma/KumaRuntimeFactory.java rename to common/src/main/java/net/blay09/mods/kuma/KumaRuntimeFactory.java diff --git a/kuma-api/common/src/main/java/net/blay09/mods/kuma/KumaRuntimeSpi.java b/common/src/main/java/net/blay09/mods/kuma/KumaRuntimeSpi.java similarity index 100% rename from kuma-api/common/src/main/java/net/blay09/mods/kuma/KumaRuntimeSpi.java rename to common/src/main/java/net/blay09/mods/kuma/KumaRuntimeSpi.java diff --git a/kuma-api/common/src/main/java/net/blay09/mods/kuma/ManagedKeyMappingRegistry.java b/common/src/main/java/net/blay09/mods/kuma/ManagedKeyMappingRegistry.java similarity index 100% rename from kuma-api/common/src/main/java/net/blay09/mods/kuma/ManagedKeyMappingRegistry.java rename to common/src/main/java/net/blay09/mods/kuma/ManagedKeyMappingRegistry.java diff --git a/kuma-api/common/src/main/java/net/blay09/mods/kuma/VanillaManagedKeyMapping.java b/common/src/main/java/net/blay09/mods/kuma/VanillaManagedKeyMapping.java similarity index 100% rename from kuma-api/common/src/main/java/net/blay09/mods/kuma/VanillaManagedKeyMapping.java rename to common/src/main/java/net/blay09/mods/kuma/VanillaManagedKeyMapping.java diff --git a/kuma-api/common/src/main/java/net/blay09/mods/kuma/VirtualManagedKeyMapping.java b/common/src/main/java/net/blay09/mods/kuma/VirtualManagedKeyMapping.java similarity index 100% rename from kuma-api/common/src/main/java/net/blay09/mods/kuma/VirtualManagedKeyMapping.java rename to common/src/main/java/net/blay09/mods/kuma/VirtualManagedKeyMapping.java diff --git a/kuma-api/common/src/main/java/net/blay09/mods/kuma/api/InputBinding.java b/common/src/main/java/net/blay09/mods/kuma/api/InputBinding.java similarity index 100% rename from kuma-api/common/src/main/java/net/blay09/mods/kuma/api/InputBinding.java rename to common/src/main/java/net/blay09/mods/kuma/api/InputBinding.java diff --git a/kuma-api/common/src/main/java/net/blay09/mods/kuma/api/KeyConflictContext.java b/common/src/main/java/net/blay09/mods/kuma/api/KeyConflictContext.java similarity index 100% rename from kuma-api/common/src/main/java/net/blay09/mods/kuma/api/KeyConflictContext.java rename to common/src/main/java/net/blay09/mods/kuma/api/KeyConflictContext.java diff --git a/kuma-api/common/src/main/java/net/blay09/mods/kuma/api/KeyModifier.java b/common/src/main/java/net/blay09/mods/kuma/api/KeyModifier.java similarity index 100% rename from kuma-api/common/src/main/java/net/blay09/mods/kuma/api/KeyModifier.java rename to common/src/main/java/net/blay09/mods/kuma/api/KeyModifier.java diff --git a/kuma-api/common/src/main/java/net/blay09/mods/kuma/api/KeyModifiers.java b/common/src/main/java/net/blay09/mods/kuma/api/KeyModifiers.java similarity index 100% rename from kuma-api/common/src/main/java/net/blay09/mods/kuma/api/KeyModifiers.java rename to common/src/main/java/net/blay09/mods/kuma/api/KeyModifiers.java diff --git a/kuma-api/common/src/main/java/net/blay09/mods/kuma/api/Kuma.java b/common/src/main/java/net/blay09/mods/kuma/api/Kuma.java similarity index 100% rename from kuma-api/common/src/main/java/net/blay09/mods/kuma/api/Kuma.java rename to common/src/main/java/net/blay09/mods/kuma/api/Kuma.java diff --git a/kuma-api/common/src/main/java/net/blay09/mods/kuma/api/ManagedKeyMapping.java b/common/src/main/java/net/blay09/mods/kuma/api/ManagedKeyMapping.java similarity index 100% rename from kuma-api/common/src/main/java/net/blay09/mods/kuma/api/ManagedKeyMapping.java rename to common/src/main/java/net/blay09/mods/kuma/api/ManagedKeyMapping.java diff --git a/kuma-api/common/src/main/java/net/blay09/mods/kuma/api/ScreenInputEvent.java b/common/src/main/java/net/blay09/mods/kuma/api/ScreenInputEvent.java similarity index 100% rename from kuma-api/common/src/main/java/net/blay09/mods/kuma/api/ScreenInputEvent.java rename to common/src/main/java/net/blay09/mods/kuma/api/ScreenInputEvent.java diff --git a/kuma-api/common/src/main/java/net/blay09/mods/kuma/api/ScreenInputEventHandler.java b/common/src/main/java/net/blay09/mods/kuma/api/ScreenInputEventHandler.java similarity index 100% rename from kuma-api/common/src/main/java/net/blay09/mods/kuma/api/ScreenInputEventHandler.java rename to common/src/main/java/net/blay09/mods/kuma/api/ScreenInputEventHandler.java diff --git a/kuma-api/common/src/main/java/net/blay09/mods/kuma/api/WorldInputEvent.java b/common/src/main/java/net/blay09/mods/kuma/api/WorldInputEvent.java similarity index 100% rename from kuma-api/common/src/main/java/net/blay09/mods/kuma/api/WorldInputEvent.java rename to common/src/main/java/net/blay09/mods/kuma/api/WorldInputEvent.java diff --git a/kuma-api/common/src/main/java/net/blay09/mods/kuma/api/WorldInputEventHandler.java b/common/src/main/java/net/blay09/mods/kuma/api/WorldInputEventHandler.java similarity index 100% rename from kuma-api/common/src/main/java/net/blay09/mods/kuma/api/WorldInputEventHandler.java rename to common/src/main/java/net/blay09/mods/kuma/api/WorldInputEventHandler.java diff --git a/kuma-api/common/src/main/java/net/blay09/mods/kuma/mixin/KeyMappingAccessor.java b/common/src/main/java/net/blay09/mods/kuma/mixin/KeyMappingAccessor.java similarity index 100% rename from kuma-api/common/src/main/java/net/blay09/mods/kuma/mixin/KeyMappingAccessor.java rename to common/src/main/java/net/blay09/mods/kuma/mixin/KeyMappingAccessor.java diff --git a/kuma-api/common/src/main/resources/kuma_api.mixins.json b/common/src/main/resources/kuma_api.mixins.json similarity index 100% rename from kuma-api/common/src/main/resources/kuma_api.mixins.json rename to common/src/main/resources/kuma_api.mixins.json diff --git a/kuma-api/common/src/main/resources/pack.mcmeta b/common/src/main/resources/pack.mcmeta similarity index 100% rename from kuma-api/common/src/main/resources/pack.mcmeta rename to common/src/main/resources/pack.mcmeta diff --git a/kuma-api/fabric/build.gradle b/fabric/build.gradle similarity index 75% rename from kuma-api/fabric/build.gradle rename to fabric/build.gradle index c6a9591..be328d1 100644 --- a/kuma-api/fabric/build.gradle +++ b/fabric/build.gradle @@ -1,6 +1,8 @@ plugins { id 'multiloader-loader' id 'fabric-loom' + id 'net.darkhax.curseforgegradle' + id "com.modrinth.minotaur" } dependencies { @@ -17,7 +19,7 @@ apply from: rootProject.file('repositories.gradle') apply from: 'dependencies.gradle' loom { - def aw = project(":kuma-api:common").file("src/main/resources/${mod_id}.accesswidener") + def aw = project(":common").file("src/main/resources/${mod_id}.accesswidener") if (aw.exists()) { accessWidenerPath.set(aw) } @@ -29,25 +31,25 @@ loom { runs { client { client() - setConfigName("fabric Client API") + setConfigName("fabric Client") ideConfigGenerated(true) runDir("runs/client") } server { server() - setConfigName("fabric Server API") + setConfigName("fabric Server") ideConfigGenerated(true) runDir("runs/server") } data { inherit client - setConfigName("fabric Data API") + setConfigName("fabric Data") ideConfigGenerated(true) runDir("build/datagen") vmArg "-Dfabric-api.datagen" - vmArg "-Dfabric-api.datagen.output-dir=${project(":kuma-api:common").file("src/generated/resources")}" + vmArg "-Dfabric-api.datagen.output-dir=${project(":common").file("src/generated/resources")}" vmArg "-Dfabric-api.datagen.modid=${mod_id}" } } -} +} \ No newline at end of file diff --git a/kuma-api/fabric/dependencies.gradle b/fabric/dependencies.gradle similarity index 100% rename from kuma-api/fabric/dependencies.gradle rename to fabric/dependencies.gradle diff --git a/kuma-api/fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricKeyMappingContexts.java b/fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricKeyMappingContexts.java similarity index 100% rename from kuma-api/fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricKeyMappingContexts.java rename to fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricKeyMappingContexts.java diff --git a/kuma-api/fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricKumaAPI.java b/fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricKumaAPI.java similarity index 100% rename from kuma-api/fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricKumaAPI.java rename to fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricKumaAPI.java diff --git a/kuma-api/fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricKumaRuntime.java b/fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricKumaRuntime.java similarity index 100% rename from kuma-api/fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricKumaRuntime.java rename to fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricKumaRuntime.java diff --git a/kuma-api/fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricKumaRuntimeFactory.java b/fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricKumaRuntimeFactory.java similarity index 100% rename from kuma-api/fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricKumaRuntimeFactory.java rename to fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricKumaRuntimeFactory.java diff --git a/kuma-api/fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricManagedKeyMappingBuilder.java b/fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricManagedKeyMappingBuilder.java similarity index 100% rename from kuma-api/fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricManagedKeyMappingBuilder.java rename to fabric/src/main/java/net/blay09/mods/kuma/fabric/FabricManagedKeyMappingBuilder.java diff --git a/kuma-api/fabric/src/main/java/net/blay09/mods/kuma/mixin/KeyMappingMixin.java b/fabric/src/main/java/net/blay09/mods/kuma/mixin/KeyMappingMixin.java similarity index 100% rename from kuma-api/fabric/src/main/java/net/blay09/mods/kuma/mixin/KeyMappingMixin.java rename to fabric/src/main/java/net/blay09/mods/kuma/mixin/KeyMappingMixin.java diff --git a/kuma-api/fabric/src/main/java/net/blay09/mods/kuma/mixin/KeyboardHandlerMixin.java b/fabric/src/main/java/net/blay09/mods/kuma/mixin/KeyboardHandlerMixin.java similarity index 100% rename from kuma-api/fabric/src/main/java/net/blay09/mods/kuma/mixin/KeyboardHandlerMixin.java rename to fabric/src/main/java/net/blay09/mods/kuma/mixin/KeyboardHandlerMixin.java diff --git a/kuma-api/fabric/src/main/java/net/blay09/mods/kuma/mixin/MouseHandlerMixin.java b/fabric/src/main/java/net/blay09/mods/kuma/mixin/MouseHandlerMixin.java similarity index 100% rename from kuma-api/fabric/src/main/java/net/blay09/mods/kuma/mixin/MouseHandlerMixin.java rename to fabric/src/main/java/net/blay09/mods/kuma/mixin/MouseHandlerMixin.java diff --git a/kuma-api/fabric/src/main/java/net/blay09/mods/kuma/mixin/OptionsMixin.java b/fabric/src/main/java/net/blay09/mods/kuma/mixin/OptionsMixin.java similarity index 100% rename from kuma-api/fabric/src/main/java/net/blay09/mods/kuma/mixin/OptionsMixin.java rename to fabric/src/main/java/net/blay09/mods/kuma/mixin/OptionsMixin.java diff --git a/kuma-api/fabric/src/main/resources/META-INF/services/net.blay09.mods.kuma.KumaRuntimeFactory b/fabric/src/main/resources/META-INF/services/net.blay09.mods.kuma.KumaRuntimeFactory similarity index 100% rename from kuma-api/fabric/src/main/resources/META-INF/services/net.blay09.mods.kuma.KumaRuntimeFactory rename to fabric/src/main/resources/META-INF/services/net.blay09.mods.kuma.KumaRuntimeFactory diff --git a/kuma-api/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json similarity index 100% rename from kuma-api/fabric/src/main/resources/fabric.mod.json rename to fabric/src/main/resources/fabric.mod.json diff --git a/kuma-api/fabric/src/main/resources/kuma_api.fabric.mixins.json b/fabric/src/main/resources/kuma_api.fabric.mixins.json similarity index 100% rename from kuma-api/fabric/src/main/resources/kuma_api.fabric.mixins.json rename to fabric/src/main/resources/kuma_api.fabric.mixins.json diff --git a/kuma-api/forge/.gitattributes b/forge/.gitattributes similarity index 100% rename from kuma-api/forge/.gitattributes rename to forge/.gitattributes diff --git a/kuma-api/forge/.gitignore b/forge/.gitignore similarity index 100% rename from kuma-api/forge/.gitignore rename to forge/.gitignore diff --git a/kuma-api/forge/build.gradle b/forge/build.gradle similarity index 75% rename from kuma-api/forge/build.gradle rename to forge/build.gradle index 8331a3d..f928f66 100644 --- a/kuma-api/forge/build.gradle +++ b/forge/build.gradle @@ -1,7 +1,9 @@ plugins { id 'multiloader-loader' - id 'net.minecraftforge.gradle' version '[6.0,6.2)' - id 'org.spongepowered.mixin' + id 'net.minecraftforge.gradle' version '[6.0.25,6.2)' + id 'org.spongepowered.mixin' version '0.7-SNAPSHOT' + id 'net.darkhax.curseforgegradle' + id "com.modrinth.minotaur" } mixin { @@ -30,7 +32,7 @@ minecraft { client { workingDirectory file('runs/client') ideaModule "${rootProject.name}.${project.name}.main" - taskName "Client API" + taskName "Client" property 'forge.enabledGameTestNamespaces', mod_id @@ -44,7 +46,7 @@ minecraft { server { workingDirectory file('runs/server') ideaModule "${rootProject.name}.${project.name}.main" - taskName "Server API" + taskName "Server" property 'forge.enabledGameTestNamespaces', mod_id @@ -54,6 +56,19 @@ minecraft { } } } + + data { + workingDirectory file('runs/data') + ideaModule "${rootProject.name}.${project.name}.main" + args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') + taskName "Data" + + mods { + modDataRun { + source sourceSets.main + } + } + } } } diff --git a/kuma-api/forge/dependencies.gradle b/forge/dependencies.gradle similarity index 100% rename from kuma-api/forge/dependencies.gradle rename to forge/dependencies.gradle diff --git a/kuma-api/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKeyModifiers.java b/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKeyModifiers.java similarity index 100% rename from kuma-api/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKeyModifiers.java rename to forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKeyModifiers.java diff --git a/kuma-api/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaAPI.java b/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaAPI.java similarity index 100% rename from kuma-api/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaAPI.java rename to forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaAPI.java diff --git a/kuma-api/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaAPIClient.java b/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaAPIClient.java similarity index 100% rename from kuma-api/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaAPIClient.java rename to forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaAPIClient.java diff --git a/kuma-api/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaRuntime.java b/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaRuntime.java similarity index 100% rename from kuma-api/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaRuntime.java rename to forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaRuntime.java diff --git a/kuma-api/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaRuntimeFactory.java b/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaRuntimeFactory.java similarity index 100% rename from kuma-api/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaRuntimeFactory.java rename to forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaRuntimeFactory.java diff --git a/kuma-api/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeManagedKeyMappingBuilder.java b/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeManagedKeyMappingBuilder.java similarity index 100% rename from kuma-api/forge/src/main/java/net/blay09/mods/kuma/forge/ForgeManagedKeyMappingBuilder.java rename to forge/src/main/java/net/blay09/mods/kuma/forge/ForgeManagedKeyMappingBuilder.java diff --git a/kuma-api/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml similarity index 100% rename from kuma-api/forge/src/main/resources/META-INF/mods.toml rename to forge/src/main/resources/META-INF/mods.toml diff --git a/kuma-api/forge/src/main/resources/META-INF/services/net.blay09.mods.kuma.KumaRuntimeFactory b/forge/src/main/resources/META-INF/services/net.blay09.mods.kuma.KumaRuntimeFactory similarity index 100% rename from kuma-api/forge/src/main/resources/META-INF/services/net.blay09.mods.kuma.KumaRuntimeFactory rename to forge/src/main/resources/META-INF/services/net.blay09.mods.kuma.KumaRuntimeFactory diff --git a/kuma-api/forge/src/main/resources/kuma_api.forge.mixins.json b/forge/src/main/resources/kuma_api.forge.mixins.json similarity index 100% rename from kuma-api/forge/src/main/resources/kuma_api.forge.mixins.json rename to forge/src/main/resources/kuma_api.forge.mixins.json diff --git a/gradle.properties b/gradle.properties index a0a8a34..be09f40 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,46 @@ +# Mod +mod_id = kuma_api +mod_name = KumaAPI +mod_author = BlayTheNinth +credits = BlayTheNinth +description = Universal Key Modifier API (Shift, CTRL, etc.) +version = 21.3.0 group = net.blay09.mods +homepage=https://mods.twelveiterations.com/mc/kuma +sources=https://github.com/TwelveIterationMods/Kuma +issues=https://github.com/TwelveIterationMods/Kuma/issues +license = MIT + +# Minecraft +minecraft_version = 1.21.3 +minimum_minecraft_version = 1.21 +minecraft_versions = 1.21,1.21.1,1.21.2,1.21.3 +minecraft_version_range = [1.21,) +pack_format_number = 57 +java_version = 21 + +# NeoForm and Parchment +neo_form_version=1.21.2-20241022.151510 +parchment_minecraft=1.21 +parchment_version=2024.07.28 + +# Forge +forge_version = 51.0.0 +forge_version_range = [51,) +forge_loader_version_range = [51,) + +# NeoForge +neoforge_snapshot_url= +neoforge_version = 21.3.0-beta +neoforge_version_range = [21,) +neoforge_loader_version_range = [1,) + +# Fabric +fabric_version = 0.106.0+1.21.1 +fabric_loader_version = 0.16.7 + +# Dependencies +mixin_version = 0.8.5 # Gradle org.gradle.jvmargs = -Xmx3G diff --git a/kuma-api/gradle.properties b/kuma-api/gradle.properties deleted file mode 100644 index be09f40..0000000 --- a/kuma-api/gradle.properties +++ /dev/null @@ -1,47 +0,0 @@ -# Mod -mod_id = kuma_api -mod_name = KumaAPI -mod_author = BlayTheNinth -credits = BlayTheNinth -description = Universal Key Modifier API (Shift, CTRL, etc.) -version = 21.3.0 -group = net.blay09.mods -homepage=https://mods.twelveiterations.com/mc/kuma -sources=https://github.com/TwelveIterationMods/Kuma -issues=https://github.com/TwelveIterationMods/Kuma/issues -license = MIT - -# Minecraft -minecraft_version = 1.21.3 -minimum_minecraft_version = 1.21 -minecraft_versions = 1.21,1.21.1,1.21.2,1.21.3 -minecraft_version_range = [1.21,) -pack_format_number = 57 -java_version = 21 - -# NeoForm and Parchment -neo_form_version=1.21.2-20241022.151510 -parchment_minecraft=1.21 -parchment_version=2024.07.28 - -# Forge -forge_version = 51.0.0 -forge_version_range = [51,) -forge_loader_version_range = [51,) - -# NeoForge -neoforge_snapshot_url= -neoforge_version = 21.3.0-beta -neoforge_version_range = [21,) -neoforge_loader_version_range = [1,) - -# Fabric -fabric_version = 0.106.0+1.21.1 -fabric_loader_version = 0.16.7 - -# Dependencies -mixin_version = 0.8.5 - -# Gradle -org.gradle.jvmargs = -Xmx3G -org.gradle.daemon = false diff --git a/kuma/common/build.gradle b/kuma/common/build.gradle deleted file mode 100644 index f0d5fe8..0000000 --- a/kuma/common/build.gradle +++ /dev/null @@ -1,60 +0,0 @@ -plugins { - id 'multiloader-common' - id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT' -} - -base { - archivesName = "${mod_id}-common-${minecraft_version}" -} - -minecraft { - version(minecraft_version) - def aw = file("src/main/resources/${mod_id}.accesswidener") - if (aw.exists()) { - accessWideners(aw) - } -} - -dependencies { - compileOnly "org.spongepowered:mixin:$mixin_version" -} - -apply from: rootProject.file('repositories.gradle') -apply from: 'dependencies.gradle' - -configurations { - commonJava { - canBeResolved = false - canBeConsumed = true - } - commonResources { - canBeResolved = false - canBeConsumed = true - } - commonGeneratedResources { - canBeResolved = false - canBeConsumed = true - } -} - -sourceSets { - generated { - resources { - srcDir 'src/generated/resources' - } - } -} - -artifacts { - commonJava sourceSets.main.java.sourceDirectories.singleFile - commonResources sourceSets.main.resources.sourceDirectories.singleFile - commonGeneratedResources sourceSets.generated.resources.sourceDirectories.singleFile -} - -sourceSets { - main { - java { - srcDir 'src/shell/java' - } - } -} \ No newline at end of file diff --git a/kuma/common/dependencies.gradle b/kuma/common/dependencies.gradle deleted file mode 100644 index 571b417..0000000 --- a/kuma/common/dependencies.gradle +++ /dev/null @@ -1,2 +0,0 @@ -dependencies { -} \ No newline at end of file diff --git a/kuma/common/src/main/resources/kuma.mixins.json b/kuma/common/src/main/resources/kuma.mixins.json deleted file mode 100644 index ac5f56d..0000000 --- a/kuma/common/src/main/resources/kuma.mixins.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "required": true, - "minVersion": "0.8", - "package": "net.blay09.mods.kuma.companion.mixin", - "refmap": "${mod_id}.refmap.json", - "compatibilityLevel": "JAVA_17", - "mixins": [ - ], - "client": [ - ], - "server": [ - ], - "injectors": { - "defaultRequire": 1 - } -} \ No newline at end of file diff --git a/kuma/common/src/main/resources/kuma.png b/kuma/common/src/main/resources/kuma.png deleted file mode 100644 index c06d063..0000000 Binary files a/kuma/common/src/main/resources/kuma.png and /dev/null differ diff --git a/kuma/common/src/main/resources/pack.mcmeta b/kuma/common/src/main/resources/pack.mcmeta deleted file mode 100644 index ad94494..0000000 --- a/kuma/common/src/main/resources/pack.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "pack": { - "description": "${mod_name}", - "pack_format": ${pack_format_number} - } -} \ No newline at end of file diff --git a/kuma/fabric/build.gradle b/kuma/fabric/build.gradle deleted file mode 100644 index d0e6bda..0000000 --- a/kuma/fabric/build.gradle +++ /dev/null @@ -1,81 +0,0 @@ -plugins { - id 'multiloader-loader' - id 'fabric-loom' - id 'net.darkhax.curseforgegradle' - id "com.modrinth.minotaur" -} - -dependencies { - minecraft "com.mojang:minecraft:${minecraft_version}" - mappings loom.officialMojangMappings() - modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}" - modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}" -} - -apply from: rootProject.file('repositories.gradle') -apply from: 'dependencies.gradle' - -loom { - def aw = project(":kuma-api:common").file("src/main/resources/${mod_id}.accesswidener") - if (aw.exists()) { - accessWidenerPath.set(aw) - } - - mixin { - defaultRefmapName.set("${mod_id}.refmap.json") - } - - runs { - client { - client() - setConfigName("fabric Client") - ideConfigGenerated(true) - runDir("runs/client") - } - server { - server() - setConfigName("fabric Server") - ideConfigGenerated(true) - runDir("runs/server") - } - data { - inherit client - setConfigName("fabric Data") - ideConfigGenerated(true) - runDir("build/datagen") - - vmArg "-Dfabric-api.datagen" - vmArg "-Dfabric-api.datagen.output-dir=${project(":kuma-api:common").file("src/generated/resources")}" - vmArg "-Dfabric-api.datagen.modid=${mod_id}" - } - } -} - -task curseforge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) { - dependsOn('build') - description = 'Publishes the Fabric build to CurseForge.' - group = 'publishing' - - apiToken = project.findProperty("curseforge.api_key") ?: System.getenv("CURSEFORGE_TOKEN") ?: "none" - - def mainFile = upload(curseforge_project_id, file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar")) - mainFile.changelog = rootProject.file('CHANGELOG.md').text - mainFile.addRequirement("fabric-api") - project.minecraft_versions.split(',').toList().each { mainFile.addGameVersion(it) } - mainFile.releaseType = "release" -} - -modrinth { - token = project.findProperty("modrinth.token") ?: System.getenv("MODRINTH_TOKEN") ?: "none" - projectId = project.modrinth_project_id - versionType = project.modrinth_release_type - versionNumber = project.version + "+fabric-" + project.minecraft_version - uploadFile = remapJar - changelog = rootProject.file("CHANGELOG.md").text - gameVersions = project.minecraft_versions.split(',').toList() - syncBodyFrom = rootProject.file("modpage.md").text - loaders = ['fabric'] - dependencies { - required.project "fabric-api" - } -} \ No newline at end of file diff --git a/kuma/fabric/dependencies.gradle b/kuma/fabric/dependencies.gradle deleted file mode 100644 index 571b417..0000000 --- a/kuma/fabric/dependencies.gradle +++ /dev/null @@ -1,2 +0,0 @@ -dependencies { -} \ No newline at end of file diff --git a/kuma/fabric/src/main/java/net/blay09/mods/kuma/companion/fabric/FabricKuma.java b/kuma/fabric/src/main/java/net/blay09/mods/kuma/companion/fabric/FabricKuma.java deleted file mode 100644 index f7ebdd3..0000000 --- a/kuma/fabric/src/main/java/net/blay09/mods/kuma/companion/fabric/FabricKuma.java +++ /dev/null @@ -1,9 +0,0 @@ -package net.blay09.mods.kuma.companion.fabric; - -import net.fabricmc.api.ClientModInitializer; - -public class FabricKuma implements ClientModInitializer { - @Override - public void onInitializeClient() { - } -} \ No newline at end of file diff --git a/kuma/fabric/src/main/resources/fabric.mod.json b/kuma/fabric/src/main/resources/fabric.mod.json deleted file mode 100644 index 02d765d..0000000 --- a/kuma/fabric/src/main/resources/fabric.mod.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "schemaVersion": 1, - "id": "kuma", - "version": "${version}", - - "name": "${mod_name}", - "description": "${description}", - "authors": [ - "BlayTheNinth" - ], - "contact": { - "homepage": "https://mods.twelveiterations.com/mc/kuma", - "sources": "https://github.com/TwelveIterationMods/Kuma", - "issues": "https://github.com/TwelveIterationMods/Kuma/issues" - }, - "license": "${license}", - "icon": "${mod_id}.png", - - "environment": "*", - "entrypoints": { - "client": [ - "net.blay09.mods.kuma.companion.fabric.FabricKuma" - ], - "modmenu": [ - ] - }, - "mixins": [ - "${mod_id}.mixins.json", - "${mod_id}.fabric.mixins.json" - ], - - "depends": { - "fabricloader": ">=${fabric_loader_version}", - "fabric-api": "*", - "minecraft": ">=${minecraft_version}", - "java": ">=${java_version}" - }, - "suggests": { - }, - "custom": { - "modmenu": { - "links": { - "modmenu.discord": "https://discord.gg/VAfZ2Nau6j" - }, - "badges": ["library"] - } - } -} diff --git a/kuma/fabric/src/main/resources/kuma.fabric.mixins.json b/kuma/fabric/src/main/resources/kuma.fabric.mixins.json deleted file mode 100644 index 1c2788f..0000000 --- a/kuma/fabric/src/main/resources/kuma.fabric.mixins.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "required": true, - "minVersion": "0.8", - "package": "net.blay09.mods.kuma.mixin", - "refmap": "${mod_id}.refmap.json", - "compatibilityLevel": "JAVA_21", - "mixins": [ - ], - "client": [ - ], - "injectors": { - "defaultRequire": 1 - } -} diff --git a/kuma/forge/.gitattributes b/kuma/forge/.gitattributes deleted file mode 100644 index f811f6a..0000000 --- a/kuma/forge/.gitattributes +++ /dev/null @@ -1,5 +0,0 @@ -# Disable autocrlf on generated files, they always generate with LF -# Add any extra files or paths here to make git stop saying they -# are changed when only line endings change. -src/generated/**/.cache/cache text eol=lf -src/generated/**/*.json text eol=lf diff --git a/kuma/forge/.gitignore b/kuma/forge/.gitignore deleted file mode 100644 index 12f8644..0000000 --- a/kuma/forge/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -# eclipse -bin -*.launch -.settings -.metadata -.classpath -.project - -# idea -out -*.ipr -*.iws -*.iml -.idea - -# gradle -build -.gradle - -# other -eclipse -run - -# Files from Forge MDK -forge*changelog.txt diff --git a/kuma/forge/build.gradle b/kuma/forge/build.gradle deleted file mode 100644 index c827990..0000000 --- a/kuma/forge/build.gradle +++ /dev/null @@ -1,116 +0,0 @@ -plugins { - id 'multiloader-loader' - id 'net.minecraftforge.gradle' version '[6.0,6.2)' - id 'org.spongepowered.mixin' - id 'net.darkhax.curseforgegradle' - id "com.modrinth.minotaur" -} - -mixin { - add(sourceSets.main, "${mod_id}.refmap.json") - - config("${mod_id}.mixins.json") - config("${mod_id}.forge.mixins.json") -} - -minecraft { - mappings channel: 'official', version: minecraft_version - - reobf = false - - copyIdeResources = true - - // Automatically enable forge AccessTransformers if the file exists - // This location is hardcoded in Forge and can not be changed. - // https://github.com/MinecraftForge/MinecraftForge/blob/be1698bb1554f9c8fa2f58e32b9ab70bc4385e60/fmlloader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/ModFile.java#L123 - def at = file('src/main/resources/META-INF/accesstransformer.cfg') - if (at.exists()) { - accessTransformer = at - } - - runs { - client { - workingDirectory file('runs/client') - ideaModule "${rootProject.name}.${project.name}.main" - taskName "Client" - - property 'forge.enabledGameTestNamespaces', mod_id - - mods { - modClientRun { - source sourceSets.main - } - } - } - - server { - workingDirectory file('runs/server') - ideaModule "${rootProject.name}.${project.name}.main" - taskName "Server" - - property 'forge.enabledGameTestNamespaces', mod_id - - mods { - modServerRun { - source sourceSets.main - } - } - } - - data { - workingDirectory file('runs/data') - ideaModule "${rootProject.name}.${project.name}.main" - args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') - taskName "Data" - - mods { - modDataRun { - source sourceSets.main - } - } - } - } -} - -sourceSets.main.resources.srcDir 'src/generated/resources' - -dependencies { - minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" - annotationProcessor "org.spongepowered:mixin:${mixin_version}:processor" -} - -apply from: rootProject.file('repositories.gradle') -apply from: 'dependencies.gradle' - -publishing { - publications { - mavenJava(MavenPublication) { - fg.component(it) - } - } -} - -task curseforge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) { - dependsOn('build') - description = 'Publishes the Forge build to CurseForge.' - group = 'publishing' - - apiToken = project.findProperty("curseforge.api_key") ?: System.getenv("CURSEFORGE_TOKEN") ?: "none" - - def mainFile = upload(curseforge_project_id, file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar")) - mainFile.changelog = rootProject.file('CHANGELOG.md').text - project.minecraft_versions.split(',').toList().each { mainFile.addGameVersion(it) } - mainFile.releaseType = "release" -} - -modrinth { - token = project.findProperty("modrinth.token") ?: System.getenv("MODRINTH_TOKEN") ?: "none" - projectId = project.modrinth_project_id - versionType = project.modrinth_release_type - versionNumber = project.version + "+forge-" + project.minecraft_version - uploadFile = jar - changelog = rootProject.file("CHANGELOG.md").text - gameVersions = project.minecraft_versions.split(',').toList() - syncBodyFrom = rootProject.file("modpage.md").text - loaders = ['forge'] -} \ No newline at end of file diff --git a/kuma/forge/dependencies.gradle b/kuma/forge/dependencies.gradle deleted file mode 100644 index 571b417..0000000 --- a/kuma/forge/dependencies.gradle +++ /dev/null @@ -1,2 +0,0 @@ -dependencies { -} \ No newline at end of file diff --git a/kuma/forge/src/main/java/net/blay09/mods/kuma/companion/forge/ForgeKuma.java b/kuma/forge/src/main/java/net/blay09/mods/kuma/companion/forge/ForgeKuma.java deleted file mode 100644 index 9405a3e..0000000 --- a/kuma/forge/src/main/java/net/blay09/mods/kuma/companion/forge/ForgeKuma.java +++ /dev/null @@ -1,10 +0,0 @@ -package net.blay09.mods.kuma.companion.forge; - -import net.minecraftforge.fml.common.Mod; - -@Mod(value = "kuma") -public class ForgeKuma { - - public ForgeKuma() { - } -} diff --git a/kuma/forge/src/main/resources/META-INF/mods.toml b/kuma/forge/src/main/resources/META-INF/mods.toml deleted file mode 100644 index df4ad4a..0000000 --- a/kuma/forge/src/main/resources/META-INF/mods.toml +++ /dev/null @@ -1,29 +0,0 @@ -modLoader="javafml" -loaderVersion="${forge_loader_version_range}" -license="${license}" -issueTrackerURL="https://github.com/TwelveIterationMods/Kuma/issues" -[[mods]] -modId="${mod_id}" -version="${version}" -displayName="${mod_name}" -displayURL="https://mods.twelveiterations.com/mc/kuma" -logoFile="${mod_id}.png" -credits="BlayTheNinth" -authors="BlayTheNinth" -description='''${description}''' -[[mixins]] -config = "${mod_id}.mixins.json" -[[mixins]] -config = "${mod_id}.forge.mixins.json" -[[dependencies.${mod_id}]] - modId="forge" - mandatory=true - versionRange="${forge_version_range}" - ordering="NONE" - side="BOTH" -[[dependencies.${mod_id}]] - modId="minecraft" - mandatory=true - versionRange="${minecraft_version_range}" - ordering="NONE" - side="BOTH" diff --git a/kuma/forge/src/main/resources/kuma.forge.mixins.json b/kuma/forge/src/main/resources/kuma.forge.mixins.json deleted file mode 100644 index 11c9c6a..0000000 --- a/kuma/forge/src/main/resources/kuma.forge.mixins.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "required": true, - "minVersion": "0.8", - "package": "net.blay09.mods.kuma.companion.mixin", - "compatibilityLevel": "JAVA_17", - "refmap": "${mod_id}.refmap.json", - "mixins": [ - ], - "client": [ - ], - "injectors": { - "defaultRequire": 1 - } -} diff --git a/kuma/gradle.properties b/kuma/gradle.properties deleted file mode 100644 index f99c5c0..0000000 --- a/kuma/gradle.properties +++ /dev/null @@ -1,46 +0,0 @@ -# Mod -mod_id = kuma -mod_name = Kuma -mod_author = BlayTheNinth -credits = BlayTheNinth -description = Universal Key Modifier API (Shift, CTRL, etc.) -version = 1.0.1 -group = net.blay09.mods -homepage=https://mods.twelveiterations.com/mc/kuma -sources=https://github.com/TwelveIterationMods/Kuma -issues=https://github.com/TwelveIterationMods/Kuma/issues -license = All Rights Reserved - -# Publishing -curseforge_release_type = release -curseforge_project_id = 1027078 -modrinth_release_type = release -modrinth_project_id = 0 - -# Minecraft -minecraft_version = 1.21 -minecraft_versions = 1.21 -minecraft_version_range = [1.21,) -pack_format_number = 18 -java_version = 21 - -# Forge -forge_version = 51.0.0 -forge_version_range = [51,) -forge_loader_version_range = [51,) - -# NeoForge -neoforge_version = 21.0.0-beta -neoforge_version_range = [21-beta,) -neoforge_loader_version_range = [1,) - -# Fabric -fabric_version = 0.100.1+1.21 -fabric_loader_version = 0.15.11 - -# Dependencies -mixin_version = 0.8.5 - -# Gradle -org.gradle.jvmargs = -Xmx3G -org.gradle.daemon = false diff --git a/kuma/neoforge/.gitattributes b/kuma/neoforge/.gitattributes deleted file mode 100644 index e91ba1e..0000000 --- a/kuma/neoforge/.gitattributes +++ /dev/null @@ -1,5 +0,0 @@ -# Disable autocrlf on generated files, they always generate with LF -# Add any extra files or paths here to make git stop saying they -# are changed when only line endings change. -src/generated/**/.cache/cache text eol=lf -src/generated/**/*.json text eol=lf \ No newline at end of file diff --git a/kuma/neoforge/.gitignore b/kuma/neoforge/.gitignore deleted file mode 100644 index 31d2550..0000000 --- a/kuma/neoforge/.gitignore +++ /dev/null @@ -1,26 +0,0 @@ -# eclipse -bin -*.launch -.settings -.metadata -.classpath -.project - -# idea -out -*.ipr -*.iws -*.iml -.idea - -# gradle -build -.gradle - -# other -eclipse -run -runs -run-data - -repo \ No newline at end of file diff --git a/kuma/neoforge/build.gradle b/kuma/neoforge/build.gradle deleted file mode 100644 index f2c902f..0000000 --- a/kuma/neoforge/build.gradle +++ /dev/null @@ -1,92 +0,0 @@ -plugins { - id 'multiloader-loader' - id 'net.neoforged.gradle.userdev' version '7.0.142' - id 'net.darkhax.curseforgegradle' - id "com.modrinth.minotaur" -} - -base { - archivesName = "${mod_id}-neoforge-${minecraft_version}" -} - -def at = file('src/main/resources/META-INF/accesstransformer.cfg') -if (at.exists()) { - minecraft.accessTransformers.file at -} - -runs { - configureEach { - // Recommended logging data for a userdev environment - // The markers can be added/remove as needed separated by commas. - // "SCAN": For mods scan. - // "REGISTRIES": For firing of registry events. - // "REGISTRYDUMP": For getting the contents of all registries. - systemProperty 'forge.logging.markers', 'REGISTRIES' - - // Recommended logging level for the console - // You can set various levels here. - // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels - systemProperty 'forge.logging.console.level', 'debug' - - modSource project.sourceSets.main - } - - client { - // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. - systemProperty 'forge.enabledGameTestNamespaces', project.mod_id - } - - server { - systemProperty 'forge.enabledGameTestNamespaces', project.mod_id - programArgument '--nogui' - } - - // This run config launches GameTestServer and runs all registered gametests, then exits. - // By default, the server will crash when no gametests are provided. - // The gametest system is also enabled by default for other run configs under the /test command. - gameTestServer { - systemProperty 'forge.enabledGameTestNamespaces', project.mod_id - } - - data { - // example of overriding the workingDirectory set in configureEach above, uncomment if you want to use it - // workingDirectory project.file('run-data') - - // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. - programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath() - } -} - -sourceSets.main.resources { srcDir 'src/generated/resources' } - -dependencies { - implementation "net.neoforged:neoforge:${neoforge_version}" -} - -apply from: rootProject.file('repositories.gradle') -apply from: 'dependencies.gradle' - -task curseforge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) { - dependsOn('build') - description = 'Publishes the NeoForge build to CurseForge.' - group = 'publishing' - - apiToken = project.findProperty("curseforge.api_key") ?: System.getenv("CURSEFORGE_TOKEN") ?: "none" - - def mainFile = upload(curseforge_project_id, file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar")) - mainFile.changelog = rootProject.file('CHANGELOG.md').text - project.minecraft_versions.split(',').toList().each { mainFile.addGameVersion(it) } - mainFile.releaseType = "release" -} - -modrinth { - token = project.findProperty("modrinth.token") ?: System.getenv("MODRINTH_TOKEN") ?: "none" - projectId = project.modrinth_project_id - versionType = project.modrinth_release_type - versionNumber = project.version + "+neoforge-" + project.minecraft_version - uploadFile = jar - changelog = rootProject.file("CHANGELOG.md").text - gameVersions = project.minecraft_versions.split(',').toList() - syncBodyFrom = rootProject.file("modpage.md").text - loaders = ['neoforge'] -} \ No newline at end of file diff --git a/kuma/neoforge/dependencies.gradle b/kuma/neoforge/dependencies.gradle deleted file mode 100644 index 571b417..0000000 --- a/kuma/neoforge/dependencies.gradle +++ /dev/null @@ -1,2 +0,0 @@ -dependencies { -} \ No newline at end of file diff --git a/kuma/neoforge/src/main/java/net/blay09/mods/kuma/companion/neoforge/NeoForgeKuma.java b/kuma/neoforge/src/main/java/net/blay09/mods/kuma/companion/neoforge/NeoForgeKuma.java deleted file mode 100644 index 9f2667f..0000000 --- a/kuma/neoforge/src/main/java/net/blay09/mods/kuma/companion/neoforge/NeoForgeKuma.java +++ /dev/null @@ -1,8 +0,0 @@ -package net.blay09.mods.kuma.companion.neoforge; - -import net.neoforged.api.distmarker.Dist; -import net.neoforged.fml.common.Mod; - -@Mod(value = "kuma", dist = Dist.CLIENT) -public class NeoForgeKuma { -} diff --git a/kuma/neoforge/src/main/resources/META-INF/neoforge.mods.toml b/kuma/neoforge/src/main/resources/META-INF/neoforge.mods.toml deleted file mode 100644 index 24eeddd..0000000 --- a/kuma/neoforge/src/main/resources/META-INF/neoforge.mods.toml +++ /dev/null @@ -1,29 +0,0 @@ -modLoader="javafml" -loaderVersion="${neoforge_loader_version_range}" -license="${license}" -issueTrackerURL="https://github.com/TwelveIterationMods/Kuma/issues" -[[mods]] -modId="${mod_id}" -version="${version}" -displayName="${mod_name}" -displayURL="https://mods.twelveiterations.com/mc/kuma" -logoFile="${mod_id}.png" -credits="BlayTheNinth" -authors="BlayTheNinth" -description='''${description}''' -[[mixins]] -config = "${mod_id}.mixins.json" -[[mixins]] -config = "${mod_id}.neoforge.mixins.json" -[[dependencies.${mod_id}]] -modId="neoforge" -type="required" -versionRange="${neoforge_version_range}" -ordering="NONE" -side="BOTH" -[[dependencies.${mod_id}]] -modId="minecraft" -type="required" -versionRange="${minecraft_version_range}" -ordering="NONE" -side="BOTH" diff --git a/kuma/neoforge/src/main/resources/kuma.neoforge.mixins.json b/kuma/neoforge/src/main/resources/kuma.neoforge.mixins.json deleted file mode 100644 index 15c3334..0000000 --- a/kuma/neoforge/src/main/resources/kuma.neoforge.mixins.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "required": true, - "minVersion": "0.8", - "package": "net.blay09.mods.kuma.companion.mixin", - "compatibilityLevel": "JAVA_21", - "mixins": [ - ], - "client": [ - ], - "injectors": { - "defaultRequire": 1 - } -} diff --git a/kuma-api/neoforge/.gitattributes b/neoforge/.gitattributes similarity index 100% rename from kuma-api/neoforge/.gitattributes rename to neoforge/.gitattributes diff --git a/kuma-api/neoforge/.gitignore b/neoforge/.gitignore similarity index 100% rename from kuma-api/neoforge/.gitignore rename to neoforge/.gitignore diff --git a/kuma-api/neoforge/build.gradle b/neoforge/build.gradle similarity index 73% rename from kuma-api/neoforge/build.gradle rename to neoforge/build.gradle index bc89fbd..81465d4 100644 --- a/kuma-api/neoforge/build.gradle +++ b/neoforge/build.gradle @@ -1,6 +1,8 @@ plugins { id 'multiloader-loader' id 'net.neoforged.moddev' + id 'net.darkhax.curseforgegradle' + id "com.modrinth.minotaur" } base { @@ -10,7 +12,7 @@ base { neoForge { version = neoforge_version // Automatically enable neoforge AccessTransformers if the file exists - def at = project(':kuma-api:common').file('src/main/resources/META-INF/accesstransformer.cfg') + def at = project(':common').file('src/main/resources/META-INF/accesstransformer.cfg') if (at.exists()) { accessTransformers.add(at.absolutePath) } @@ -48,17 +50,5 @@ neoForge { sourceSets.main.resources { srcDir 'src/generated/resources' } -repositories { - if (neoforge_snapshot_url) { - maven { - url = neoforge_snapshot_url - content { - includeModule('net.neoforged', 'testframework') - includeModule('net.neoforged', 'neoforge') - } - } - } -} - apply from: rootProject.file('repositories.gradle') apply from: 'dependencies.gradle' \ No newline at end of file diff --git a/kuma-api/neoforge/dependencies.gradle b/neoforge/dependencies.gradle similarity index 100% rename from kuma-api/neoforge/dependencies.gradle rename to neoforge/dependencies.gradle diff --git a/kuma-api/neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeKeyModifiers.java b/neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeKeyModifiers.java similarity index 100% rename from kuma-api/neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeKeyModifiers.java rename to neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeKeyModifiers.java diff --git a/kuma-api/neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeKumaAPI.java b/neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeKumaAPI.java similarity index 100% rename from kuma-api/neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeKumaAPI.java rename to neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeKumaAPI.java diff --git a/kuma-api/neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeKumaRuntime.java b/neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeKumaRuntime.java similarity index 100% rename from kuma-api/neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeKumaRuntime.java rename to neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeKumaRuntime.java diff --git a/kuma-api/neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeKumaRuntimeFactory.java b/neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeKumaRuntimeFactory.java similarity index 100% rename from kuma-api/neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeKumaRuntimeFactory.java rename to neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeKumaRuntimeFactory.java diff --git a/kuma-api/neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeManagedKeyMappingBuilder.java b/neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeManagedKeyMappingBuilder.java similarity index 100% rename from kuma-api/neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeManagedKeyMappingBuilder.java rename to neoforge/src/main/java/net/blay09/mods/kuma/neoforge/NeoForgeManagedKeyMappingBuilder.java diff --git a/kuma-api/neoforge/src/main/resources/META-INF/neoforge.mods.toml b/neoforge/src/main/resources/META-INF/neoforge.mods.toml similarity index 100% rename from kuma-api/neoforge/src/main/resources/META-INF/neoforge.mods.toml rename to neoforge/src/main/resources/META-INF/neoforge.mods.toml diff --git a/kuma-api/neoforge/src/main/resources/META-INF/services/net.blay09.mods.kuma.KumaRuntimeFactory b/neoforge/src/main/resources/META-INF/services/net.blay09.mods.kuma.KumaRuntimeFactory similarity index 100% rename from kuma-api/neoforge/src/main/resources/META-INF/services/net.blay09.mods.kuma.KumaRuntimeFactory rename to neoforge/src/main/resources/META-INF/services/net.blay09.mods.kuma.KumaRuntimeFactory diff --git a/kuma-api/neoforge/src/main/resources/kuma_api.neoforge.mixins.json b/neoforge/src/main/resources/kuma_api.neoforge.mixins.json similarity index 100% rename from kuma-api/neoforge/src/main/resources/kuma_api.neoforge.mixins.json rename to neoforge/src/main/resources/kuma_api.neoforge.mixins.json diff --git a/settings.gradle b/settings.gradle index 84c35f8..5d40357 100644 --- a/settings.gradle +++ b/settings.gradle @@ -43,11 +43,7 @@ plugins { id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0' } -include("kuma-api:common") -include("kuma-api:fabric") -//include("kuma-api:forge") -include("kuma-api:neoforge") -// include("kuma:common") -// include("kuma:fabric") -// include("kuma:forge") -// include("kuma:neoforge") \ No newline at end of file +include("common") +include("fabric") +//include("forge") +include("neoforge") \ No newline at end of file