X Tutup
Skip to content

Commit 9b98fe0

Browse files
added gradle task copyJarsForJPackage to prepare input directory for jpackage; refactored jpackage config to build app-image.
app-image may be overkill - originally configured to allow adding jars needed for debug and output processes at runtime, but app launchers cannot be added for those jars after the app-image is created which is why the new gradle task copyJarsForJPackage is needed. Keeping the app-image config around for now incase it's needed to embed samples and licenses. "--app-content" for JDK 21's jpackage may be usable in the future, but it doesn't appear to handle duplicates at the moment.
1 parent c77e83d commit 9b98fe0

17 files changed

+65
-27
lines changed

.github/workflows/jpackage.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ jobs:
2727
name: Build distribution
2828
run: |
2929
gradle -v
30-
gradle build
31-
jpackage --verbose "@jpackage.cfg" "@jpackage-linux.cfg"
30+
gradle build copyJarsForJPackage
31+
# Create app-image to allow modifying app package contents before creating installer
32+
jpackage --verbose "@jpackage/jpackage.cfg" "@jpackage/jpackage-app-image.cfg" --icon "icons/icon.png"
33+
# Create native installer
34+
jpackage --verbose "@jpackage/jpackage.cfg" "@jpackage/jpackage-linux.cfg"
3235

3336
# SAVE INSTALLER
3437
- id: upload-installer
@@ -61,8 +64,11 @@ jobs:
6164
name: Build distribution
6265
run: |
6366
gradle -v
64-
gradle build
65-
jpackage --verbose "@jpackage.cfg" "@jpackage-windows.cfg"
67+
gradle build copyJarsForJPackage
68+
# Create app-image to allow modifying app package contents before creating installer
69+
jpackage --verbose "@jpackage/jpackage.cfg" "@jpackage/jpackage-app-image.cfg" --icon "icons/icon.ico"
70+
# Create native installer
71+
jpackage --verbose "@jpackage/jpackage.cfg" "@jpackage/jpackage-windows.cfg"
6672

6773
# SAVE INSTALLER
6874
- id: upload-installer
@@ -94,8 +100,11 @@ jobs:
94100
name: Build distribution
95101
run: |
96102
gradle -v
97-
gradle build
98-
jpackage --verbose "@jpackage.cfg" "@jpackage-mac.cfg"
103+
gradle build copyJarsForJPackage
104+
# Create app-image to allow modifying app package contents before creating installer
105+
jpackage --verbose "@jpackage/jpackage.cfg" "@jpackage/jpackage-app-image.cfg" --icon "icons/icon.icns"
106+
# Create native installer
107+
jpackage --verbose "@jpackage/jpackage.cfg" "@jpackage/jpackage-mac.cfg"
99108

100109
# SAVE INSTALLER
101110
- id: upload-installer

.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,18 @@ repositories {
1717

1818
dependencies {
1919
testImplementation 'junit:junit:4.12'
20+
}
21+
22+
// prepare input directory for jpackage distribution builds
23+
tasks.register('copyJarsForJPackage', Copy) {
24+
dependsOn 'build'
25+
26+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
27+
28+
from project(":app").layout.buildDirectory.dir("libs")
29+
into layout.buildDir.dir("libs")
30+
from project(":library").layout.buildDirectory.dir("libs")
31+
into layout.buildDir.dir("libs")
32+
from project(":debugServer").layout.buildDirectory.dir("libs")
33+
into layout.buildDir.dir("libs")
2034
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

jpackage-mac.cfg

Lines changed: 0 additions & 5 deletions
This file was deleted.

jpackage-windows.cfg

Lines changed: 0 additions & 4 deletions
This file was deleted.

jpackage.cfg

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)
X Tutup