Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/commitTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: Set up PATH
run: |
echo "${ANDROID_HOME}/build-tools/34.0.0" >> $GITHUB_PATH
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release Mod

on:
release:
types: [published]

permissions:
contents: write

jobs:
buildJar:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v7
- name: Set up PATH
run: |
echo "${ANDROID_HOME}/build-tools/34.0.0" >> $GITHUB_PATH
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
- name: Build mod jar
run: |
chmod +x ./gradlew
./gradlew deploy
- name: Upload release artifact
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release upload "${{ github.event.release.tag_name }}" \
"build/libs/${{ github.event.repository.name }}.jar" \
--clobber
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# Mindustry Java Mod Template
A Java Mindustry mod template that works on Android and PC. The Kotlin version of this mod can be seen [here](https://github.com/Anuken/MindustryKotlinModTemplate).

## Registering the mod with Mindustry Mod Browser

The list of mods displayed in the Mod Browser is [created automatically](https://github.com/Anuken/MindustryMods). For your mod to be included, the following criteria need to be met:

- Must have a valid `mod.json` / `mod.hjson` file in the root or `assets/` directory.
- Must have the `mindustry-mod` topic. Do **NOT** use the `mindustry-mod-v7` or `mindustry-mod-v8` topics, they are ignored!
- Must have a `minGameVersion` >= `136` in `mod.json`.
- Must have a release published, containing the compiled mod as an asset. This template ensures this asset is created automatically when a release is published, just creating and publishing a release is enough.

### Opting Out

If you would like to remove your mod from the public browser, add `hideBrowser: true` to your `mod.json` / `mod.hjson`.

## Building for Desktop Testing

1. Install JDK **17**.
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ jar{

from(projectDir){
include "mod.hjson"
include "icon.png"
}

from("assets/"){
Expand Down