-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
27f5855
commit def7231
Showing
1 changed file
with
37 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,48 @@ | ||
# Flux API | ||
|
||
### Using flux in your projects | ||
## Usage | ||
|
||
Step 1: Add [CRModder's Maven](https://maven.crmodders.dev/) in your build.gradle at the end of your repositories tag.\ | ||
Here is an example `repositories` section | ||
``` | ||
### Adding to Project | ||
|
||
Flux API is available on [JitPack] and can be made available by adding the | ||
following to your `build.gradle(.kts)`, though you don't have to if you already | ||
have the [Cosmic Loom] gradle plugin. | ||
|
||
[Cosmic Loom]: https://codeberg.org/CRModders/cosmic-loom | ||
[JitPack]: https://github.com/jitpack/jitpack.io | ||
|
||
```gradle.kts | ||
repositories { | ||
maven { url 'https://maven.crmodders.dev/releases/' } | ||
maven { url 'https://maven.crmodders.dev/snapshots/' } | ||
mavenCentral() | ||
maven { | ||
name = "JitPack" | ||
url = uri("https://jitpack.io") | ||
} | ||
} | ||
``` | ||
|
||
Step 2: Add Flux to your dependencies using the text below | ||
``` | ||
gameMod "dev.crmodders:fluxapi:0.6.0" | ||
After adding the maven repository, a dependency should be declared in the same | ||
script for Gradle to include it with building. | ||
|
||
```gradle.kts | ||
dependencies { | ||
modImplementation("com.github.CRModders:FluxAPI:0.8.0") | ||
} | ||
``` | ||
|
||
### Dev Commands (for contributors) | ||
To run Cosmic Quilt in the dev env, run `gradle runQuilt`\ | ||
To run Fabric in the dev env, run `gradle runFabric`\ | ||
To build, run `gradlew build` with the jar being in `build/libs/` and ending with `-all.jar` | ||
## Building | ||
|
||
Flux API uses the Cosmic Loom plugin, you may refer to the plugin's | ||
documentation. Following are some example commands: | ||
|
||
### [Flux-Modules](./doc/modules.md) | ||
```sh | ||
# Creates the JARs and places it at: ./build/libs/ | ||
./gradlew build | ||
|
||
### [Docs](./doc/) | ||
# Runs Cosmic Reach on the development environment | ||
./gradlew runClient | ||
./gradlew runServer | ||
|
||
# Ignores cached version numbers fo Gradle can download new ones that it missed | ||
# Useful with `SNAPSHOT` dependencies from JitPack | ||
./gradlew --refresh-dependencies | ||
``` |