You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-26Lines changed: 18 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,28 +32,29 @@ If your mod is written in Java (and is, hence, a Jar mod), use this method.
32
32
33
33
2.**Add the library Jar file into your project as a Java dependency:**
34
34
35
-
This is a necessary step before you can compile your mod, since the library Jar contains the methods (functions) used to access custom JSON tags.\
36
-
To get the library file, either download the latest release of `CustomJsonLib.jar` (NOT `CustomJsonLibCrossPlatform.jar`) from Releases, or compile your own (See [Building](#building) below).
35
+
CustomJsonLib is available as a Maven package on GitHub. To include it as a dependency you're going to need to add the repository to your `build.gradle.kts` (or `build.gradle` if you're using Groovy) file:
| Fully supported | Untested, should work | Untested, should work | Untested, should work | No support |
313
314
314
-
### Building as a Library
315
-
316
-
If you want to include this mod as a library for your own Java mods (explained in [How do I use this library?](#how-do-i-use-this-library) above) you're going to need a library `jar` file.
317
-
318
-
The latest release can be found in Releases under the name `CustomJsonLib.jar`, but if you want to build your own, here are the steps:
319
-
1. Open your terminal, and `cd` to your local copy of the mod.
320
-
2. Ensure your internet connection is stable on the first or clean builds, as the project will try to fetch prerequisites from the internet.
321
-
3. Run `gradlew lib` *(replace `gradlew` with `./gradlew` on Mac/Linux)*. This should create a JAR inside `build/libs/` that you can copy over to your mod's `lib/` folder to use it.
322
-
323
315
### Desktop Build
324
316
325
-
Desktop builds are convenient for testing, but will obviously **not** work on Android, so never include this in your releases. Desktop JARs have `Desktop` suffixed to their name (`CustomJsonLibDesktop.jar`). Here's how you can build the mod:
317
+
Desktop builds are convenient for testing, but they will **not** work on Android. Desktop JARs have `Desktop` suffixed to their name (`CustomJsonLibDesktop.jar`). Here's how you can build the mod:
326
318
327
319
1. Open your terminal, and `cd` to your local copy of the mod.
328
320
2. Ensure your internet connection is stable on the first or clean builds, as the project will try to fetch prerequisites from the internet.
329
-
3. Run `gradlew jar` *(replace `gradlew` with `./gradlew` on Mac/Linux)*. This should create a JAR inside `build/libs/` that you can copy over to the Mindustry mods folder to install it.
321
+
3. Run `gradlew jar` *(replace `gradlew` with `./gradlew` on Mac/Linux/Powershell)*. This should create a JAR inside `build/libs/` that you can copy over to the Mindustry mods folder to install it.
330
322
4. You can also then run `gradlew install` to automatically install the mod JAR, or even `gradlew jar install` to do both compiling and installing at once.
331
323
332
324
### Android Build
333
325
334
326
Android builds are automated on the CI hosted by GitHub Actions, so you should be able to just push a commit and wait for the CI to provide your build. If you still want to build locally, though, follow these steps.
335
327
336
328
#### Installing Android SDK
337
-
1. Install [Android SDK](https://developer.android.com/studio#command-line-tools-only), specifically the "**Command line tools only**" section. Download the tools that match your platform.
329
+
1. Install the [Android SDK](https://developer.android.com/studio#command-line-tools-only), specifically the "**Command line tools only**" section. Download the tools that match your platform.
338
330
2. Unzip the Android SDK command line tools inside a folder; let's call it `AndroidSDK/` for now.
339
331
3. Inside this folder is a folder named `cmdline-tools/`. Put everything inside `cmdline-tools/` to a new folder named `latest/`, so that the folder structure looks like `AndroidSDK/cmdline-tools/latest/`.
340
332
4. Open your terminal, `cd` to the `latest/` folder.
0 commit comments