Deploy#
MGPP provides two useful tasks for deployment on Android, dexJar
and deploy
,
but they only work when java
plugin is enabled.
The deploy{}
closure is inside of mindustry{}
closure hereinafter.
Related tasks: jar
, dexJar
, deploy
Deployment Jar#
The deploy
task will output the deployment jar, which contains classes.dex
and your stuffs
Destination Directory#
As default, deploy
task outputs into its temporary directory, buildDir/tmp/deploy
.
You can customize its destination to fit your CI, vice versa.
Name#
The name of deployment jar is in the pattern of baseName-version-classifier.jar
Default values:
deploy {
baseName = 'ExampleMod'
version = '1.0'
classifer = ''
}
deploy {
baseName = "ExampleMod"
version = "1.0"
classifer = ""
}
Enable fat jar#
Whether to make a fat jar
, which contains all dependencies from classpath, in the jar
task.
It's useful when you utilize other library or make a Kotlin mod.
fatJar
: To enable fat jar.noFatJar
: To disable fat jar.
deploy {
fatJar
// OR
noFatJar
}
deploy {
fatJar
// OR
noFatJar
}
MGPP will apply fatJar
as default.
Android SDK#
You can configure the location of Android SDK, but mgpp doesn't recommend you to do that.
MGPP will automatically search for Android SDK in order of the environment variables mentioned below:
ANDROID_HOME
ANDROID_SDK_ROOT
deploy {
androidSdkRoot = 'D:/AnroidSDK'
}
deploy {
androidSdkRoot = "D:/AnroidSDK"
}