Skip to content

Commit

Permalink
added fat jar config (#36)
Browse files Browse the repository at this point in the history
* added fat jar config

* corrected fatjar upload

* minor change
  • Loading branch information
munishchouhan authored Dec 11, 2023
1 parent 9c925b7 commit bb3ec2b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, macos-latest-xlarge, windows-latest]
include:
- os: ubuntu-latest
fatjar: true
- os: macos-latest
codesign: true
- os: macos-latest-xlarge
Expand All @@ -40,6 +42,17 @@ jobs:
run: |
./gradlew test
- name: Build fat JAR
if: ${{ matrix.fatjar}}
run: ./gradlew shadowJar

- name: Upload fat JAR artifact
if: ${{ matrix.fatjar}}
uses: actions/upload-artifact@v2
with:
name: wave_jar
path: ./app/build/libs/wave.jar

- name: Build native
run: |
./gradlew app:nativeCompile
Expand Down
7 changes: 7 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'io.seqera.wave.cli.java-application-conventions'
id 'groovy'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'org.graalvm.buildtools.native' version '0.9.28'
}

Expand Down Expand Up @@ -55,6 +56,12 @@ application {
applicationDefaultJvmArgs = ["-agentlib:native-image-agent=config-merge-dir=conf/"]
}

shadowJar {
archiveBaseName.set('wave')
archiveClassifier.set('')
archiveVersion.set('')
}

run {
if( environment['JVM_OPTS'] ) {
jvmArgs(environment['JVM_OPTS'])
Expand Down
6 changes: 6 additions & 0 deletions jreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,9 @@ distributions:
- path: "nativeCompile-windows-latest/wave.exe"
transform: "wave-{{projectEffectiveVersion}}-windows-x86_64.exe"
platform: windows-x86_64

wave-cli-jar:
type: SINGLE_JAR
artifacts:
- path: "wave_jar/wave.jar"
transform: "wave-{{projectEffectiveVersion}}.jar"

0 comments on commit bb3ec2b

Please sign in to comment.