Usage
Because this plugin was made in Kotlin, using Kotlin as your DSL is recommended.
-
Import the plugin to the build script:
// Groovy as DSL plugins{ // Not yet release }
// Kotlin as DSL plugins{ // Not yet release }
-
Configure the plugin
// Groovy as DSL mindustry { projectType = Mod dependency { mindustry version: 'v135' // useMirror version: 'd7312445a1' arc version: '123fbf12b9' } client { official version: 'v135' // be version: '22714' } server { official version: 'v135' // be version: '22714' } assets { // This affects only the output jar. And as default, // it will read ModMeta from the mod.[h]json in the root directory. modMeta( name: 'your-mod-name', displayName: 'Your mod', main: 'org.example.FooMod', author: 'yourself' ) } mods { worksWith { // You can import some mods to work with this mod in here. github 'liplum/cyberio' } } deploy { // You can configure the deployment task here } }
// Kotlin as DSL import plumy.mindustry.mindustry mindustry { projectType.set(Mod) dependency { mindustry(version = "v135") // useMirror(version = "d7312445a1") arc(version = "123fbf12b9") } client { official(version = "v135") // be(version = "22714") } server { official(version = "v135") // be(version = "22714") } assets { // This affects only the output jar. And as default, // it will read ModMeta from the mod.[h]json in the root directory. modMeta( name = "your-mod-name", displayName = "Your mod", main = "org.example.FooMod", author = "yourself" ) } mods { // You can import some mods to work with this mod in here. worksWith { github("liplum/cyberio") } } deploy { // You can configure the deployment task here } }
-
Import the dependencies of Mindustry.
// Groovy as DSL repositories { mavenCentral() use(plumy.mindustry.BuildScript) { mindustryRepo() } } dependencies { use(plumy.mindustry.BuildScript) { importMindustry() } }
// Kotlin as DSL import plumy.mindustry.mindustryRepo repositories { mavenCentral() mindustryRepo() } dependencies { importMindustry() }
-
Run the task In the group, mindustry, there are many tasks for building and debugging mods. Also, you can find them in your IDE.
# runClient or runServer: to download the game on GitHub and run it. .\gradlew runClient # deploy: if the android sdk is set properly, # a jar compitable on both Desktop and Android will be outputted in ./build/tmp/deploy folder. .\gradew deploy