Skip to content

xpdustry/template-plugin

Repository files navigation

template-plugin

Build status Mindustry 7.0

Get your Mindustry plugin started with this awesome template repository, it features :

  • GitHub actions for easier testing (the plugin is built for each commit and pull request).

  • Toxopid Gradle plugin for faster Mindustry plugin development and testing.

  • Indra Gradle plugin for easier java development.

  • Bundling and automatic relocation (isolating your dependencies to avoid class loading issues) with the Shadow gradle plugin.

    • Unused classes are removed from the final jar.
  • The build script contains a lot of comments to help you understand what is going on.

  • A CHANGELOG.md file that will be updated automatically when you create a release on GitHub.

How to use

  1. Update the build.gradle.kts, settings.gradle.kts and plugin.json files with your plugin data.

  2. Clear CHANGELOG.md and update LICENSE.md with your name.

  3. Start K O D I N G.

  4. When ready for a release, push your last changes with the release version. Then create a release on GitHub. Once published, the plugin jar will be built and added to the release and the CHANGELOG.md file will be updated with the release notes of the GitHub release.

Installation

This plugin requires :

  • Java 17 or above.

  • Mindustry v146 or above.

Building

  • ./gradlew shadowJar to compile the plugin into a usable jar (will be located at builds/libs/(plugin-name).jar).

  • ./gradlew jar for a plain jar that contains only the plugin code.

  • ./gradlew runMindustryServer to run the plugin in a local Mindustry server.

  • ./gradlew runMindustryClient to start a local Mindustry client that will let you test the plugin.