Configure ShadowJar for fat jar generation and update workflow
Some checks failed
Build JStom / build (push) Failing after 38s
Some checks failed
Build JStom / build (push) Failing after 38s
This commit is contained in:
@@ -29,10 +29,10 @@ jobs:
|
|||||||
run: chmod +x gradlew
|
run: chmod +x gradlew
|
||||||
|
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew build
|
run: ./gradlew shadowJar
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: JStom-Jar
|
name: JStom-FatJar
|
||||||
path: build/libs/*.jar
|
path: build/libs/jstom-1.0-SNAPSHOT.jar
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
id("application")
|
id("application")
|
||||||
|
id("com.github.johnrengelman.shadow") version "8.1.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "net.jstom"
|
group = "net.jstom"
|
||||||
@@ -30,6 +31,13 @@ application {
|
|||||||
mainClass.set("net.jstom.Main")
|
mainClass.set("net.jstom.Main")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks {
|
||||||
|
shadowJar {
|
||||||
|
mergeServiceFiles()
|
||||||
|
archiveClassifier.set("") // Remove '-all' suffix so it replaces the default jar or just sits nicely
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
toolchain {
|
toolchain {
|
||||||
languageVersion.set(JavaLanguageVersion.of(25))
|
languageVersion.set(JavaLanguageVersion.of(25))
|
||||||
|
|||||||
Reference in New Issue
Block a user