Skip to content

Commit

Permalink
build: make assemble depend on shadowJar
Browse files Browse the repository at this point in the history
  • Loading branch information
Cubxity committed Oct 4, 2021
1 parent 91094a5 commit c71c41e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew shadowJar --no-daemon
run: ./gradlew assemble --no-daemon
- name: Set variables
id: vars
run: echo ::set-output name=version::${GITHUB_REF#refs/*\/dev/}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew shadowJar --no-daemon
run: ./gradlew assemble --no-daemon
- name: Set variables
id: vars
run: echo ::set-output name=version::${GITHUB_REF#refs/tags/v}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ $ git clone https://github.com/Cubxity/UnifiedMetrics && cd UnifiedMetrics
Open a terminal in the cloned directory and run the following command. The following command will build all subprojects.

```bash
$ ./gradlew shadowJar
$ ./gradlew assemble
```

To build a specific subproject, you can prefix it with the subproject path. For example:

```bash
$ `./gradlew :unifiedmetrics-platform-bukkit:shadowJar`
$ `./gradlew :unifiedmetrics-platform-bukkit:assemble`
```

The output artifacts can be found in `subproject/build/libs`.
Expand Down
5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,9 @@ subprojects {
freeCompilerArgs = listOf("-Xopt-in=kotlin.RequiresOptIn")
}
}
afterEvaluate {
tasks.findByName("shadowJar")?.also {
tasks.named("assemble") { dependsOn(it) }
}
}
}
2 changes: 1 addition & 1 deletion platforms/fabric/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

plugins {
id("fabric-loom") version "0.9-SNAPSHOT"
id("fabric-loom") version "0.9.9"
id("net.kyori.blossom")
}

Expand Down

0 comments on commit c71c41e

Please sign in to comment.