2019-11-25 20:50:32 -05:00

2017-12-09 17:58:34 -05:00
2021-02-17 19:44:04 -05:00
[](https://github.com/Anuken/Mindustry/actions)
2021-02-18 10:24:52 -05:00
[](https://discord.gg/mindustry)
2018-09-25 23:31:45 -04:00
2022-05-10 18:44:52 -04:00
The automation tower defense RTS, written in Java.
2017-12-09 17:58:34 -05:00
2018-03-05 17:00:02 -05:00
_[Trello Board ](https://trello.com/b/aE2tcUwF/mindustry-40-plans )_
2020-06-14 19:58:19 -04:00
_[Wiki ](https://mindustrygame.github.io/wiki )_
2020-06-14 19:58:08 -04:00
_[Javadoc ](https://mindustrygame.github.io/docs/ )_
2017-12-09 17:58:34 -05:00
2020-10-17 09:37:09 -04:00
## Contributing
2019-11-18 00:55:33 -05:00
See [CONTRIBUTING ](CONTRIBUTING.md ).
2020-10-17 09:37:09 -04:00
## Building
2017-12-09 17:58:34 -05:00
2020-09-04 11:12:05 -04:00
Bleeding-edge builds are generated automatically for every commit. You can see them [here ](https://github.com/Anuken/MindustryBuilds/releases ).
2017-12-21 15:43:30 -05:00
If you'd rather compile on your own, follow these instructions.
2021-10-31 13:19:37 -04:00
First, make sure you have [JDK 16-17 ](https://adoptium.net/archive.html?variant=openjdk17&jvmVariant=hotspot ) installed. **Other JDK versions will not work.** Open a terminal in the Mindustry directory and run the following commands:
2017-12-09 17:58:34 -05:00
2020-10-17 09:37:09 -04:00
### Windows
2017-12-09 18:09:34 -05:00
2020-09-24 18:32:57 +03:00
_Running:_ `gradlew desktop:run`
_Building:_ `gradlew desktop:dist`
_Sprite Packing:_ `gradlew tools:pack`
2017-12-09 17:58:34 -05:00
2020-10-17 09:37:09 -04:00
### Linux/Mac OS
2017-12-09 18:06:09 -05:00
2020-02-05 19:06:16 +01:00
_Running:_ `./gradlew desktop:run`
2020-02-03 21:55:53 +01:00
_Building:_ `./gradlew desktop:dist`
2020-02-04 08:44:54 +13:00
_Sprite Packing:_ `./gradlew tools:pack`
2017-12-09 18:06:09 -05:00
2020-10-17 09:37:09 -04:00
### Server
2018-10-28 20:05:20 -04:00
2019-02-21 19:12:07 -05:00
Server builds are bundled with each released build (in Releases). If you'd rather compile on your own, replace 'desktop' with 'server', e.g. `gradlew server:dist` .
2018-10-28 20:05:20 -04:00
2020-10-17 09:37:09 -04:00
### Android
2019-09-12 12:40:52 -04:00
2021-08-17 08:27:36 -04:00
1. Install the Android SDK [here. ](https://developer.android.com/studio#command-tools ) Make sure you're downloading the "Command line tools only", as Android Studio is not required.
2020-08-31 21:53:42 -04:00
2. Set the `ANDROID_HOME` environment variable to point to your unzipped Android SDK directory.
2019-09-12 12:40:52 -04:00
3. Run `gradlew android:assembleDebug` (or `./gradlew` if on linux/mac). This will create an unsigned APK in `android/build/outputs/apk` .
2020-09-05 20:46:02 -04:00
To debug the application on a connected phone, run `gradlew android:installDebug android:run` .
2019-09-12 12:40:52 -04:00
2020-10-17 09:37:09 -04:00
### Troubleshooting
#### Permission Denied
2019-03-12 23:09:06 +04:00
2019-03-12 16:37:32 -04:00
If the terminal returns `Permission denied` or `Command not found` on Mac/Linux, run `chmod +x ./gradlew` before running `./gradlew` . *This is a one-time procedure.*
2019-03-12 23:09:06 +04:00
2017-12-09 18:09:34 -05:00
---
2017-12-09 18:06:09 -05:00
Gradle may take up to several minutes to download files. Be patient. < br >
2019-08-21 15:50:58 -04:00
After building, the output .JAR file should be in `/desktop/build/libs/Mindustry.jar` for desktop builds, and in `/server/build/libs/server-release.jar` for server builds.
2017-12-09 17:58:34 -05:00
2020-10-17 09:37:09 -04:00
## Feature Requests
2020-02-22 19:30:02 -05:00
Post feature requests and feedback [here ](https://github.com/Anuken/Mindustry-Suggestions/issues/new/choose ).
2020-10-17 09:37:09 -04:00
## Downloads
2017-12-09 17:58:34 -05:00
2020-11-28 10:44:14 -05:00
| [](https://anuke.itch.io/mindustry) | [](https://play.google.com/store/apps/details?id=io.anuke.mindustry) | [](https://f-droid.org/packages/io.anuke.mindustry) | [](https://flathub.org/apps/details/com.github.Anuken.Mindustry)
|--- |--- |--- |--- |