A ui debugger made by me. This mod is very far from being complete, if you use it, don't expect it to be stable.
- Clone the repository (this requires a GitHub account, of course)
- Perform any necessary changes
- Push a commit
- Go to the "actions" tab and click on the latest run block.
If the build was successful, you will see a green indicator and a ZIPPED artifact that contains a .jar file. You should download this artifact and unzip it. This is a github limitation, you can't just upload a file as artifact.
If the build was unsuccessful Xin 99% cases that means you made a mistake in code) you can click on the "building" job to see the log and understand what caused the error.
Note: you can use github actions without any limitations in public repositories, but in private repositories the total execution time is limited to 2000 minutes per account (for free plan users)
If you use this approach, I assume you use linux and have the necessary experience in using the terminal
Before building, you have to prepare the environment:
- Make sure you have
gitandd8(in case of multiplatform building) installed. - run
git clone --depth 0 https//github.com/Mnemotechnician/kotlin-mindustry-mod-template(replace the user and repo with your ones) - run
cd kotlin-mindustry-mod-template(or wherever it was cloned into)
Now, you can compile either for desktop only or for both mobile and desktop
- Run
./gradlew release
It may warn you that several java.util., java.time. and java.nio. classes that kotlin sdk depends on are missing but you shouldn't care about that: android sdk < 30 doesn't support them. You shouldn't be using them at all: arc provides alternatives for these classes.
In case of succeful building a jar file named compiled-mod-any-platform.jar (the name depends on jarName string defined in build.gradle.kts) will appear in mod-src/build/libs/.
This file can be used both on android and on desktop.
- Run
./gradlew jar
Everything is similar to the previous paragraph, except that the file will be named compiled-mod-desktop.jar and will only be usable on desktop.
You should never upload this file as a release. At least a public one. There's a lot of mobile users in the community and they won't be able to use your mod at all: it will install but will not load