Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
StartsMercury committed Nov 10, 2024
1 parent 27f5855 commit def7231
Showing 1 changed file with 37 additions and 17 deletions.
54 changes: 37 additions & 17 deletions README.md
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
```

0 comments on commit def7231

Please sign in to comment.