Skip to content

Commit aa6870c

Browse files
Merge branch 'non-modular' of https://github.com/danielpeintner/Java11Test into non-modular
# Conflicts: # build.gradle
2 parents 953b500 + fdefe61 commit aa6870c

File tree

6 files changed

+18
-11
lines changed

6 files changed

+18
-11
lines changed

build.gradle

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
// Windows: set JAVA_HOME=C:\Program Files\Java\jdk-21
33
// Windows: set JAVA_HOME=C:\Program Files\Java\jdk-25
44
// Linux: export JAVA_HOME=/usr/lib/jvm/jdk-11.0.5+10
5-
// MacOS: export JAVA_HOME=`/usr/libexec/java_home -v 11`
5+
// MacOS: export JAVA_HOME=`/usr/libexec/java_home -v 21`
66

77
plugins {
88
id 'application'
99
id 'org.openjfx.javafxplugin' version '0.1.0'
10-
id 'org.beryx.runtime' version '2.0.0-rc'
10+
id 'org.beryx.runtime' version '2.0.0'
1111
// id 'org.unbroken-dome.xjc' version '2.0.0'
1212
id 'com.github.bjornvester.xjc' version "1.8.2" // https://github.com/bjornvester/xjc-gradle-plugin
1313
}
@@ -94,7 +94,7 @@ def company = 'My Company'
9494

9595
application {
9696
applicationName = 'hello-fx'
97-
mainClass.set("com.example.hellofx.Launcher")
97+
mainClass.set("com.my_company.hellofx.Launcher")
9898
applicationDefaultJvmArgs = [
9999
// necessary for JavaFX24+ (see https://gluonhq.com/products/javafx/openjfx-24-release-notes/)
100100
// "--enable-native-access=ALL-UNNAMED",
@@ -137,12 +137,19 @@ runtime {
137137
'--copyright', company,
138138
]
139139
if(os.macOsX) {
140-
imageOptions = ['--mac-sign', '--icon', 'src/main/deploy/package/macosx/hello.icns']
140+
imageOptions = ['--mac-sign', '--icon', 'src/main/deploy/package/macosx/hello.icns', '--mac-package-identifier', 'com.my-company.hellofx']
141141
installerOptions += [
142-
// '--mac-sign',
142+
// Note: --mac-package-identifier needs to be part of imageOptions
143+
// '--mac-package-identifier', 'com.my-company.hellofx',
144+
'--mac-sign',
143145
// '--mac-signing-key-user-name', System.getenv('SIGNING_KEY_USER_NAME'),
144146
// '--mac-signing-keychain', System.getenv('SIGNING_KEYCHAIN_PATH')
145147
]
148+
// 3 jpackage steps
149+
// * /Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home/bin/jpackage --type app-image --input /Users/daniel/Documents/GitHub/Java11Test/build/install/hello-fx/lib --main-jar Java11Test-25.11.04.jar --main-class com.my_company.hellofx.Launcher --dest /Users/daniel/Documents/GitHub/Java11Test/build/jpackage --name hello-fx --app-version 25.11.04 --runtime-image /Users/daniel/Documents/GitHub/Java11Test/build/jre --java-options --add-opens=javafx.base/com.sun.javafx.event=ALL-UNNAMED --java-options --add-opens=javafx.base/com.sun.javafx.collections=ALL-UNNAMED --java-options --add-opens=javafx.base/com.sun.javafx.runtime=ALL-UNNAMED --java-options --add-opens=javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED --java-options --add-opens=javafx.graphics/com.sun.javafx.scene.traversal=ALL-UNNAMED --java-options --add-opens=javafx.graphics/javafx.scene=ALL-UNNAMED --java-options --add-opens=javafx.controls/javafx.scene.control.skin=ALL-UNNAMED --java-options --add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED --mac-sign --icon src/main/deploy/package/macosx/hello.icns --mac-package-identifier com.my-company.hellofx
150+
// * /Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home/bin/jpackage --type pkg --dest /Users/daniel/Documents/GitHub/Java11Test/build/jpackage --name hello-fx --app-version 25.11.04 --app-image /Users/daniel/Documents/GitHub/Java11Test/build/jpackage/hello-fx.app --app-version 25.11.04 --vendor "My Company" --copyright "My Company" --mac-sign
151+
// * /Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home/bin/jpackage --type dmg --dest /Users/daniel/Documents/GitHub/Java11Test/build/jpackage --name hello-fx --app-version 25.11.04 --app-image /Users/daniel/Documents/GitHub/Java11Test/build/jpackage/hello-fx.app --app-version 25.11.04 --vendor "My Company" --copyright "My Company" --mac-sign
152+
146153
} else if(os.windows) {
147154
imageOptions = ['--icon', 'src/main/deploy/package/windows/coffee.ico']
148155
installerType = 'msi'

src/main/java/com/example/hellofx/DataBean.java renamed to src/main/java/com/my_company/hellofx/DataBean.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example.hellofx;
1+
package com.my_company.hellofx;
22

33
@SuppressWarnings("unused")
44
public class DataBean {

src/main/java/com/example/hellofx/HelloFX.java renamed to src/main/java/com/my_company/hellofx/HelloFX.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example.hellofx;
1+
package com.my_company.hellofx;
22

33
import com.example.jaxb.Project;
44
import com.ibm.icu.text.RuleBasedNumberFormat;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package com.example.hellofx;
1+
package com.my_company.hellofx;
22

33
public class Launcher {
44
public static void main(String[] args) {
5-
com.example.hellofx.HelloFX.main(args);
5+
HelloFX.main(args);
66
}
77
}

src/test/java/com/example/hellofx/HelloFXTest.java renamed to src/test/java/com/my_company/hellofx/HelloFXTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example.hellofx;
1+
package com.my_company.hellofx;
22

33
import org.junit.jupiter.api.Test;
44

src/test/java/com/example/hellofx/LeakTest.java renamed to src/test/java/com/my_company/hellofx/LeakTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.example.hellofx;
1+
package com.my_company.hellofx;
22

33
import de.sandec.jmemorybuddy.JMemoryBuddy;
44
import javafx.application.Platform;

0 commit comments

Comments
 (0)