Skip to content

Commit 4510d19

Browse files
authored
Merge branch 'master' into BasedUser-patch-1-1
2 parents 8cc4418 + e3ad75f commit 4510d19

641 files changed

Lines changed: 28522 additions & 13401 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,5 @@ body:
7272
required: true
7373
- label: I have searched the closed and open issues to make sure that this problem has not already been reported.
7474
required: true
75+
- label: "I am not using Foo's Client, and have made sure the bug is not caused by mods I have installed."
76+
required: true

.github/workflows/deployment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
rm -rf .github
4545
rm README.md
4646
git add .
47-
git commit --allow-empty -m "${GITHUB_SHA}"
47+
git commit --allow-empty -m "Updating"
4848
git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/Anuken/MindustryJitpack
4949
git tag ${RELEASE_VERSION}
5050
git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/Anuken/MindustryJitpack
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: "Validate Gradle Wrapper"
2+
on: [push, pull_request]
3+
4+
jobs:
5+
validation:
6+
name: "Validation"
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: gradle/wrapper-validation-action@v2

.github/workflows/pr.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ jobs:
1717
java-version: 17
1818
- name: Setup Gradle
1919
uses: gradle/gradle-build-action@v2
20+
- name: Run unit tests
21+
run: ./gradlew tests:test --stacktrace --rerun
2022
- name: Run unit tests and build JAR
21-
run: ./gradlew test desktop:dist
23+
run: ./gradlew desktop:dist
2224
- name: Upload desktop JAR for testing
23-
uses: actions/upload-artifact@v2
25+
uses: actions/upload-artifact@v4
2426
with:
2527
name: Desktop JAR (zipped)
2628
path: desktop/build/libs/Mindustry.jar

.github/workflows/push.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
./gradlew updateBundles
3434
3535
if [ -n "$(git status --porcelain)" ]; then
36+
git config --global user.name "Github Actions"
37+
git config --global user.email "actions@github.com"
3638
git add core/assets/bundles/*
3739
git commit -m "Automatic bundle update"
3840
git push
@@ -41,7 +43,7 @@ jobs:
4143
if: ${{ github.repository == 'Anuken/Mindustry' }}
4244
run: |
4345
git config --global user.name "Github Actions"
44-
git config --global user.email "cli@github.com"
46+
git config --global user.email "actions@github.com"
4547
cd ../
4648
cp -r ./Mindustry ./MindustryJitpack
4749
cd MindustryJitpack
@@ -52,8 +54,8 @@ jobs:
5254
rm -rf .github
5355
rm README.md
5456
git add .
55-
git commit --allow-empty -m "${GITHUB_SHA}"
57+
git commit --allow-empty -m "Updating"
5658
git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/Anuken/MindustryJitpack
5759
cd ../Mindustry
5860
- name: Run unit tests
59-
run: ./gradlew clean cleanTest test --stacktrace
61+
run: ./gradlew tests:test --rerun --stacktrace

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ logs/
66
/core/assets/.gifimages/
77
/deploy/
88
/out/
9+
ios/libs/
910
/desktop/packr-out/
1011
/desktop/packr-export/
1112
/desktop/mindustry-saves/
@@ -43,6 +44,7 @@ steam_appid.txt
4344
ios/robovm.properties
4445
packr-out/
4546
config/
47+
buildSrc/
4648
*.gif
4749
/tests/out
4850

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ See [CONTRIBUTING](CONTRIBUTING.md).
1818
Bleeding-edge builds are generated automatically for every commit. You can see them [here](https://github.com/Anuken/MindustryBuilds/releases).
1919

2020
If you'd rather compile on your own, follow these instructions.
21-
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:
21+
First, make sure you have [JDK 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:
2222

2323
### Windows
2424

@@ -53,6 +53,16 @@ To debug the application on a connected device/emulator, run `gradlew android:in
5353

5454
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.*
5555

56+
#### Where is the `mindustry.gen` package?
57+
58+
As the name implies, `mindustry.gen` is generated *at build time* based on other code. You will not find source code for this package in the repository, and it should not be edited by hand.
59+
60+
The following is a non-exhaustive list of the "source" of generated code in `mindustry.gen`:
61+
62+
- `Call`, `*Packet` classes: Generated from methods marked with `@Remote`.
63+
- All entity classes (`Unit`, `EffectState`, `Posc`, etc): Generated from component classes in the `mindustry.entities.comp` package, and combined using definitions in `mindustry.content.UnitTypes`.
64+
- `Sounds`, `Musics`, `Tex`, `Icon`, etc: Generated based on files in the respective asset folders.
65+
5666
---
5767

5868
Gradle may take up to several minutes to download files. Be patient. <br>

SERVERLIST.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Note: Server list review is currently on pause. No new servers will be merged until v8 is released!
2+
3+
*PRs to edit addresses of existing servers will still be accepted, although very infrequently.*
4+
15
### Adding a server to the list
26

37
Mindustry now has a public list of servers that everyone can see and connect to.
@@ -18,13 +22,16 @@ You'll need to either hire some moderators, or make use of (currently non-existe
1822
4. **Get some good maps.** *(optional, but highly recommended)*. Add some maps to your server and set the map rotation to custom-only. You can get maps from the Steam workshop by subscribing and exporting them; using the `#maps` channel on Discord is also an option.
1923
5. **Check your server configuration.** *(optional)* I would recommend adding a message rate limit of 1 second (`config messageRateLimit 1`), and disabling connect/disconnect messages to reduce spam (`config showConnectMessages false`).
2024
6. Finally, **submit a pull request** to add your server's IP to the list.
21-
This should be fairly straightforward: Press the edit button on the [server file](https://github.com/Anuken/Mindustry/blob/master/servers_v7.json), then add a JSON object with a single key, indicating your server address.
22-
For example, if your server address is `example.com:6000`, you would add a comma after the last entry and insert:
25+
This should be fairly straightforward: Press the edit button on the [server file](https://github.com/Anuken/Mindustry/blob/master/servers_v7.json), then add a JSON object with the following format:
2326
```json
2427
{
25-
"address": "example.com:6000"
28+
"name": "Your Server Group Name",
29+
"address": ["your.server.address"]
2630
}
2731
```
32+
33+
If your group has multiple servers, simply add extra addresses inside the square brackets, separated by commas. For example: `["address1", "address2"]`
34+
2835
> Note that Mindustry also support SRV records. This allows you to use a subdomain for your server address instead of specifying the port. For example, if you want to use `play.example.com` instead of `example.com:6000`, in the dns settings of your domain, add an SRV record with `_mindustry` as the service, `tcp` as the protocol, `play` as the target and `6000` as the port. You can also setup fallback servers by modifying the weight or priority of the record. Although SRV records are very convenient, keep in mind they are slower than regular addresses. Avoid using them in the server list, but rather as an easy way to share your server address.
2936

3037
Then, press the *'submit pull request'* button and I'll take a look at your server. If I have any issues with it, I'll let you know in the PR comments.

android/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="io.anuke.mindustry">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
65
<uses-feature android:name="android.hardware.type.pc" android:required="false" />

android/build.gradle

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript{
77
}
88

99
dependencies{
10-
classpath 'com.android.tools.build:gradle:7.2.1'
10+
classpath 'com.android.tools.build:gradle:8.2.2'
1111
}
1212
}
1313

@@ -29,8 +29,9 @@ task deploy(type: Copy){
2929
}
3030

3131
android{
32-
buildToolsVersion '33.0.2'
33-
compileSdkVersion 33
32+
namespace = "io.anuke.mindustry"
33+
buildToolsVersion = '34.0.0'
34+
compileSdk = 34
3435
sourceSets{
3536
main{
3637
manifest.srcFile 'AndroidManifest.xml'
@@ -56,7 +57,7 @@ android{
5657

5758
applicationId "io.anuke.mindustry"
5859
minSdkVersion 14
59-
targetSdkVersion 33
60+
targetSdkVersion 34
6061

6162
versionName versionNameResult
6263
versionCode = vcode
@@ -65,14 +66,16 @@ android{
6566
props['androidBuildCode'] = (vcode + 1).toString()
6667
}
6768
props.store(file('../core/assets/version.properties').newWriter(), null)
69+
70+
multiDexEnabled true
6871
}
6972

7073
compileOptions{
7174
sourceCompatibility JavaVersion.VERSION_1_8
7275
targetCompatibility JavaVersion.VERSION_1_8
7376
}
7477

75-
flavorDimensions "google"
78+
flavorDimensions = ["google"]
7679

7780
signingConfigs{
7881
release{
@@ -119,8 +122,8 @@ dependencies{
119122
implementation arcModule("backends:backend-android")
120123
implementation 'com.jakewharton.android.repackaged:dalvik-dx:9.0.0_r3'
121124

122-
natives "com.github.Anuken.Arc:natives-android:${getArcHash()}"
123-
natives "com.github.Anuken.Arc:natives-freetype-android:${getArcHash()}"
125+
natives "com.github.Anuken.Arc:natives-android:$arcHash"
126+
natives "com.github.Anuken.Arc:natives-freetype-android:$arcHash"
124127

125128
def version;
126129
def highestVersion;

0 commit comments

Comments
 (0)