Mindustry
Radio Mod, Made with GlennFolker's Mod Template
.
Radio is a mod that remakes Mindustry's music player, making the menu, editor and launch musics customizable, and adds a playlist like system, that plays like mindustry classic's music system. Includes Mod Soundtracks, as long as they're in the music/ folder.
Mindustry Java mods are cross-platform, supporting PC (Windows, Mac, Linux) and Android. This section describes how to build the JARs for both PC and Android. Building these JARs are done through the usage of terminals: cmd.exe
in Windows, Terminal in Mac, and if you're either on Linux or using a terminal emulator on Android such as Termux, you should already know what you're doing anyway. Following these steps should require basic terminal functionality such as cd
.
Desktop builds are convenient for testing, but will obviously not work on Android, so never include this in your releases. Desktop JARs have Desktop
suffixed to their name, e.g. ModTemplateDesktop.jar
. Here's how you can build the mod:
- Open your terminal, and
cd
to your local copy of the mod. - Ensure your internet connection on first or clean builds, as the project will try to fetch prerequisites from the internet.
- Run
gradlew jar
(replacegradlew
with./gradlew
on Mac/Linux). This should create a JAR insidebuild/libs/
that you can copy over to the Mindustry mods folder to install it. - You can also then run
gradlew install
to automatically install the mod JAR, or evengradlew jar install
to do both compiling and installing at once.
Android builds are automated on the CI hosted by GitHub Actions, so you should be able to just push a commit and wait for the CI to provide your build. If you still want to build locally, though, follow these steps.
- Install Android SDK, specifically the "Command line tools only" section. Download the tools that match your platform.
- Unzip the Android SDK command line tools inside a folder; let's call it
AndroidSDK/
for now. - Inside this folder is a folder named
cmdline-tools/
. Put everything insidecmdline-tools/
to a new folder namedlatest/
, so that the folder structure looks likeAndroidSDK/cmdline-tools/latest/
. - Open your terminal,
cd
to thelatest/
folder. - Run
sdkmanager --install "platforms;android-34" "build-tools;34.0.0"
. These versions correspond to theandroidSdkVersion
andandroidBuildVersion
properties insidegradle.properties
, which default to34
and34.0.0
, respectively. - Set environment variable
ANDROID_SDK_ROOT
as the full path to theAndroidSDK/
folder you created, and restart your terminal to update the environments.
- Open your terminal, and
cd
to your local copy of the mod. - Run
gradlew dex
. This should create a cross-platform JAR insidebuild/libs/
that isn't suffixed withDesktop
that you can copy over to the Mindustry mods folder to install it. - You can also then run
gradlew installDex
to automatically install the mod JAR, or evengradlew dex installDex
to do both compiling and installing at once.
Never use implementation
for Mindustry/Arc groups and their submodules. There's a reason they're compileOnly
; they're only present in compilation and excluded from the final JARs, as on runtime they're resolved from the game instance itself. Other JAR-mod dependencies must also use compileOnly
. Only ever use implementation
for external Java libraries that must be bundled with your mod.
The project is licensed under GNU GPL v3.