diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 8dcfe59c4b..50fa001df5 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -2,7 +2,7 @@
name: Bug report
about: Create a report to help fix an issue.
title: ''
-labels: ''
+labels: bug
assignees: ''
---
@@ -15,6 +15,10 @@ assignees: ''
**Steps to reproduce**: *How you happened across the issue, and what you were doing at the time.*
+**Link to mod(s) used, if applicable**: *The mod repositories or zip files that are related to the issue.*
+
+**Crash report, if applicable**: *The contents of relevant crash report files.*
+
---
*Place an X (no spaces) between the brackets to confirm that you have read the line below.*
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 0000000000..e1d9fecf05
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,8 @@
+blank_issues_enabled: false
+contact_links:
+ - name: Feature request
+ url: https://github.com/Anuken/Mindustry-Suggestions/issues/new/choose
+ about: Do not make a new issue for feature requests! Instead, post it in suggestions repository.
+ - name: Question
+ url: https://discord.com/invite/mindustry
+ about: Questions about the game should be asked in the Discord, not in the issue tracker.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
deleted file mode 100644
index 7a08062e1d..0000000000
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ /dev/null
@@ -1,11 +0,0 @@
----
-name: Feature request
-about: Do not make a new issue for feature requests! Instead, post in the suggestions
- repository. See the README.
-title: ''
-labels: invalid
-assignees: ''
-
----
-
-**Do not make a new issue for feature requests!** Instead, post it in suggestions repository: https://github.com/Anuken/Mindustry-Suggestions/issues/new/choose
diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml
index d7d43c1d44..c2326a4d0a 100644
--- a/.github/workflows/gradle.yml
+++ b/.github/workflows/gradle.yml
@@ -3,15 +3,26 @@ name: Java CI
on: [push]
jobs:
- build:
-
+ buildJava8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- - name: Set up JDK 1.8
+ - name: Set up JDK 8
uses: actions/setup-java@v1
with:
- java-version: 1.8
- #- name: Run unit tests with gradle
- # run: ./gradlew test
+ java-version: 8
+ - name: Run unit tests with gradle and Java 8
+ run: ./gradlew test
+
+ buildJava14:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v1
+ - name: Set up JDK 14
+ uses: actions/setup-java@v1
+ with:
+ java-version: 14
+ - name: Run unit tests with gradle and Java 14
+ run: ./gradlew test
diff --git a/.gitignore b/.gitignore
index f230c07b3c..1a50ef27f2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@ logs/
/desktop/mindustry-saves/
/desktop/mindustry-maps/
/desktop/gifexport/
+/gifs/
/core/lib/
/ios/assets/
/core/assets-raw/sprites/generated/
@@ -18,6 +19,7 @@ logs/
/annotations/out/
/net/build/
/tools/build/
+/core/build/
/tests/build/
/server/build/
changelog
@@ -27,7 +29,6 @@ core/assets/saves/
/core/assets/saves/
steam_appid.txt
/test_files/
-/annotations/build/
/android/assets/mindustry-maps/
/android/assets/mindustry-saves/
/core/assets/gifexport/
@@ -39,11 +40,9 @@ steam_appid.txt
ios/robovm.properties
packr-out/
config/
-changelog
*.gif
-/core/assets/saves/
-/out/
+/core/assets/basepartnames
version.properties
.attach_*
diff --git a/.travis.yml b/.travis.yml
index fb5295ac57..ef04618dc9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,10 +1,10 @@
jdk:
- openjdk8
-dist: trusty
+dist: xenial
android:
components:
- android-29
- - build-tools-29.0.2
+ - build-tools-29.0.3
script:
- git clone --depth=1 --branch=master https://github.com/Anuken/MindustryBuilds ../MindustryBuilds
@@ -20,6 +20,12 @@ script:
- "./gradlew test"
- "./gradlew desktop:dist -Pbuildversion=${TRAVIS_TAG:1}"
- "./gradlew server:dist -Pbuildversion=${TRAVIS_TAG:1}"
+- "./gradlew core:javadoc"
+- cd ../
+- git clone --depth=1 https://github.com/MindustryGame/docs.git
+- cp -a Mindustry/core/build/docs/javadoc/. docs/
+- cd docs
+- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git add .; git commit -m "Update ${TRAVIS_BUILD_NUMBER}"; git push https://Anuken:${GH_PUSH_TOKEN}@github.com/MindustryGame/docs; fi
deploy:
- provider: releases
skip_cleanup: true
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 199aa17bf6..c79ce649fc 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -26,11 +26,12 @@ This means:
- 4 spaces indentation
- `camelCase`, **even for constants or enums**. Why? Because `SCREAMING_CASE` is ugly, annoying to type and does not achieve anything useful. Constants are *less* dangerous than variables, not more.
- No underscores for anything. (Yes, I know `Bindings` violates this principle, but that's for legacy reasons and really should be cleaned up some day)
+- Do not use braceless `if/else` statements. `if(x) statement else statement2` should **never** be done. In very specific situations, having braceless if-statements on one line is allowed: `if(cond) return;` would be valid.
Import [this style file](.github/Mindustry-CodeStyle-IJ.xml) into IntelliJ to get correct formatting when developing Mindustry.
#### Do not use incompatible Java features (java.util.function, java.awt).
-Android [does not support](https://developer.android.com/studio/write/java8-support#supported_features) many of Java 8's features, such as the packages `java.util.function`, `java.util.stream` or `forEach` in collections. Do not use these in your code.
+Android and RoboVM (iOS) do not support many of Java 8's features, such as the packages `java.util.function`, `java.util.stream` or `forEach` in collections. Do not use these in your code.
If you need to use functional interfaces, use the ones in `arc.func`, which are more or less the same with different naming schemes.
The same applies to any class *outside* of the standard `java.[n]io` / `java.net` / `java.util` packages: Most of them are not supported.
diff --git a/README.md b/README.md
index 03152f0cf6..06026e0e02 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,8 @@
A sandbox tower defense game written in Java.
_[Trello Board](https://trello.com/b/aE2tcUwF/mindustry-40-plans)_
-_[Wiki](https://mindustrygame.github.io/wiki)_
+_[Wiki](https://mindustrygame.github.io/wiki)_
+_[Javadoc](https://mindustrygame.github.io/docs/)_
### Contributing
diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml
index 05e0d30698..7d4d731df1 100644
--- a/android/AndroidManifest.xml
+++ b/android/AndroidManifest.xml
@@ -17,7 +17,7 @@
android:usesCleartextTraffic="true"
android:appCategory="game"
android:label="@string/app_name"
- android:theme="@style/GdxTheme" android:fullBackupContent="@xml/backup_rules">
+ android:theme="@style/ArcTheme" android:fullBackupContent="@xml/backup_rules">
- def outputDir = null
- if(jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("libs/arm64-v8a")
- if(jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a")
- if(jar.name.endsWith("natives-armeabi.jar")) outputDir = file("libs/armeabi")
- if(jar.name.endsWith("natives-x86_64.jar")) outputDir = file("libs/x86_64")
- if(jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86")
- if(outputDir != null){
- copy{
- from zipTree(jar)
- into outputDir
- include "*.so"
- }
+ copy{
+ from zipTree(jar)
+ into file("libs/")
+ include "**"
}
}
}
diff --git a/android/res/values-v21/styles.xml b/android/res/values-v21/styles.xml
index e1bed057f8..3076a158ed 100644
--- a/android/res/values-v21/styles.xml
+++ b/android/res/values-v21/styles.xml
@@ -1,6 +1,6 @@
-