Skip to content

Dependency#

Import#

To apply the dependency configuration, you have to call importMindustry() when declaring dependency inside dependencies{} closure in your build.gradle[.kts].

dependencies {
    importMindustry()
}
import io.github.liplum.mindustry.*
dependencies {
    importMindustry()
}

You can import Mindustry for a specific dependency configuration, such as ksp plugin.

dependencies {
    importMindustry('ksp')
}
import io.github.liplum.mindustry.*
dependencies {
    importMindustry("ksp")
}

MGPP provides dependency{} closure for you to configure which version you want to use, and it's inside of mindustry{} closure hereinafter.


Arc dependency#

You can specify the which Arc version to use with this syntax.

dependency {
    arc version: 'v136' // a released version
    // OR
    arc version: '47925a7b91' // a commit snapshot
}
dependency {
    arc on "v136" // a released version
    // OR
    arc on "47925a7b91" // a commit snapshot
}

As default, mgpp will apply arc v136.

Notations#
  • latest: To apply the latest commit of Arc, such as 47925a7b91.

    NOTE: It might not work if you faced the API limit of GitHub or jitpack yet to build this version.

  • latestTag: To apply the latest tag of Arc, such as v136.

    NOTE: It has a very small chance that it won't work when the new version was just released.

dependency {
    arc version: latest
    arc version: latestTag
}
dependency {
    arc on latest
    arc on latestTag
}

Mindustry Dependency#

You can specify the which Mindustry version to use with this syntax.

  • mindustry: only supports released versions
  • mirror: only supports commit snapshots
dependency {
    mindustry version: 'v136' // a released version of Mindustry
    // OR
    mindustryMirror version: '558283c6c8' // a commit snapshot from mirror
}
dependency {
    mindustry on "v136" // a released version of Mindustry
    // OR
    mindustry mirror "558283c6c8" // a commit snapshot from mirror
}

As default, mgpp will apply mindustry v136.

Notations#
  • latest

    • For mindustry: To apply the latest release of Mindustry, such as v136.

      NOTE: It has a very small chance that it won't work when the new version was just released.

    • For mirror: To apply the latest commit of Mindustry mirror, such as 558283c6c8.

      NOTE: It might not work if you faced the API limit of GitHub or jitpack yet to build this version.

  • latestRelease:

    • Only for mindustry: To apply the latest release of Mindustry, completely the same as mindustry latest, such as v136.

      NOTE: It has a very small chance that it won't work when the new version was just released.

dependency {
    mindustry version: latest
    mindustry version: latestRelease
    mindustryMirror version: latest
}
dependency {
    mindustry on latest
    mindustry on latestRelease
    mindustry mirror latest
}