Skip to content

Commit 7630cd1

Browse files
committed
update README accordingly
1 parent 11bfb2f commit 7630cd1

1 file changed

Lines changed: 4 additions & 27 deletions

File tree

README.md

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Before diving in, a good understanding of Java and Git is **highly recommended**
2828

2929
* **`mod.json`:** This file contains your mod's metadata.
3030
* `name`: The internal, unique ID for your mod (e.g., `my-awesome-mod`). This is critical and used by Gradle, generators, annotations, tools, and Mindustry itself. **It's highly recommended that your main Java package and related initial `template` folders (like `main/src/template`, `annotations/src/template/annotations`, `tools/src/template/tools`) are renamed to match this value (e.g., if `name` is `my-awesome-mod`, rename the `template` package to `myawesomemod`). This consistency greatly improves clarity, convenience, and compatibility with the template's systems.**
31-
* `displayName`: The user-friendly name shown in Mindustry's mod browser (e.g., `My Awesome Mod`). This also influences the default names of your built JAR files via Gradle.
31+
* `displayName`: The user-friendly name shown in Mindustry's mod browser (e.g., `My Awesome Mod`). This also influences the default names of your built JAR files via Gradle and the artifacts generated by GitHub Actions.
3232
* `author`: Your name or your team's name.
3333
* `description`: A brief description of your mod.
3434
* `version`: Your mod's version (e.g., `1.0.0`).
@@ -45,29 +45,6 @@ Before diving in, a good understanding of Java and Git is **highly recommended**
4545
* `annotations/src/template/annotations/...` to `annotations/src/myawesomemod/annotations/...`
4646
* `tools/src/template/tools/...` to `tools/src/myawesomemod/tools/...`
4747
* Update the `package` declarations within the Java files in these refactored directories.
48-
* **GitHub Actions CI (`.github/workflows/ci.yml`):**
49-
* The Gradle build system will name your JAR files based on `modDisplayName` from `mod.json` (e.g., `MyAwesomeMod.jar`, `MyAwesomeModDesktop.jar`).
50-
* However, the `ci.yml` file has **hardcoded paths and artifact names** that you **must update** to match your mod's `displayName`.
51-
* Specifically, find these sections and update them:
52-
* Under `steps:` for the `Build and Publish Jar` job:
53-
```diff
54-
- name: Upload built mod artifact as a GitHub Action artifact
55-
# ...
56-
with:
57-
- name: Template (in a box)
58-
- path: main/build/libs/Template.jar
59-
+ name: YourModDisplayName (in a box) # Or any artifact name you prefer
60-
+ path: main/build/libs/YourModDisplayName.jar # Match Gradle output
61-
```
62-
* And for the release:
63-
```diff
64-
- name: Upload built mod artifact into release
65-
# ...
66-
with:
67-
- files: build/libs/Template.jar
68-
+ files: build/libs/YourModDisplayName.jar # Match Gradle output for the cross-platform JAR
69-
```
70-
Replace `YourModDisplayName` with the value of `modDisplayName` from your `mod.json` (with spaces removed, e.g., if `displayName` is "My Awesome Mod", use `MyAwesomeMod`).
7148

7249
Here's an example of a properly configured mod base, assuming the mod's `displayName` is "My Awesome Mod" and `name` in `mod.json` is `my-awesome-mod`:
7350

@@ -207,9 +184,9 @@ This produces a JAR compatible with both Android and PC (e.g., `MyAwesomeMod.jar
207184
208185
* **Using GitHub Actions (Recommended):**
209186
* Push your changes to your GitHub repository.
210-
* The CI workflow (defined in `.github/workflows/ci.yml` and **manually updated by you as described in step 4**) will automatically build both Desktop and Android JARs.
211-
* You can download these from the "Artifacts" section of the completed workflow run. The cross-platform JAR artifact might be named something like `MyAwesomeMod (in a box).zip` (containing `MyAwesomeMod.jar`), depending on how you updated `ci.yml`.
212-
* When you create a GitHub Release, the cross-platform JAR (e.g., `MyAwesomeMod.jar`) is automatically uploaded if you configured `ci.yml` correctly.
187+
* The CI workflow (defined in `.github/workflows/ci.yml`) will automatically build both Desktop and Android JARs using names derived from your `mod.json`.
188+
* You can download these from the "Artifacts" section of the completed workflow run. The cross-platform JAR artifact might be named something like `MyAwesomeMod (in a box).zip` (containing `MyAwesomeMod.jar`).
189+
* When you create a GitHub Release, the cross-platform JAR (e.g., `MyAwesomeMod.jar`) is automatically uploaded.
213190
214191
* **Local Android Build (Optional):**
215192
If you need to build for Android locally:

0 commit comments

Comments
 (0)