From 8f888da59fce6cdd7cabbff67d3ae77834d5f408 Mon Sep 17 00:00:00 2001 From: Florian Enner Date: Wed, 15 Jul 2026 15:47:48 +0200 Subject: [PATCH 1/2] tested snapshot version of reachability annotations --- GoNative/pom.xml | 21 +++++++++++++++++++ .../gonative/views/AppViewManager.java | 4 ++++ HelloFXML/pom.xml | 21 ++++++++++++++++++- .../src/main/java/hellofx/HelloFXML.java | 4 ++++ HelloFXML/src/main/java/module-info.java | 1 + alarm/pom.xml | 20 ++++++++++++++++++ .../samples/alarm/service/Service.java | 2 ++ .../samples/alarm/views/AppViewManager.java | 7 +++++++ beacons/pom.xml | 20 ++++++++++++++++++ .../com/gluonhq/samples/beacons/Beacons.java | 4 +++- .../samples/beacons/views/AppViewManager.java | 6 ++++++ cloudlink-cloudfirst-storage/pom.xml | 20 ++++++++++++++++++ .../cloudfirst/views/AppViewManager.java | 5 +++++ .../src/main/java/module-info.java | 1 + comments/pom.xml | 20 ++++++++++++++++++ .../comments/views/AppViewManager.java | 9 ++++++-- notes/pom.xml | 20 ++++++++++++++++++ .../samples/notes/views/AppViewManager.java | 17 ++++++++++++--- pom.xml | 1 + pushnotes/pom.xml | 20 ++++++++++++++++++ .../pushnotes/views/AppViewManager.java | 11 ++++++++++ 21 files changed, 227 insertions(+), 7 deletions(-) diff --git a/GoNative/pom.xml b/GoNative/pom.xml index 02e2e868..4497584d 100755 --- a/GoNative/pom.xml +++ b/GoNative/pom.xml @@ -80,6 +80,13 @@ runtime ${attach.extended.classifier} + + + us.hebi.graalvm + reachability-annotations + ${reachability.version} + provided + @@ -95,6 +102,20 @@ org.apache.maven.plugins maven-compiler-plugin 3.8.1 + + + -Aproject=${project.groupId}/${project.artifactId} + -Areachability.processDependencyInjection=true + -Areachability.outputFormat=1.0.0 + + + + us.hebi.graalvm + reachability-processor + ${reachability.version} + + + diff --git a/GoNative/src/main/java/com/gluonhq/samples/gonative/views/AppViewManager.java b/GoNative/src/main/java/com/gluonhq/samples/gonative/views/AppViewManager.java index 405c9c7f..f15c3450 100644 --- a/GoNative/src/main/java/com/gluonhq/samples/gonative/views/AppViewManager.java +++ b/GoNative/src/main/java/com/gluonhq/samples/gonative/views/AppViewManager.java @@ -34,6 +34,8 @@ import com.gluonhq.charm.glisten.control.NavigationDrawer; import com.gluonhq.charm.glisten.visual.MaterialDesignIcon; import javafx.scene.image.Image; +import us.hebi.graalvm.reachability.annotations.Reachable; +import us.hebi.graalvm.reachability.annotations.ReachableFxView; import java.util.Locale; @@ -41,6 +43,8 @@ import static com.gluonhq.charm.glisten.afterburner.AppView.Flag.SHOW_IN_DRAWER; import static com.gluonhq.charm.glisten.afterburner.AppView.Flag.SKIP_VIEW_STACK; +@Reachable(resources = "/icon.png") +@ReachableFxView("main") public class AppViewManager { private static final AppViewRegistry REGISTRY = new AppViewRegistry(); diff --git a/HelloFXML/pom.xml b/HelloFXML/pom.xml index a73f708a..e6fc92e4 100755 --- a/HelloFXML/pom.xml +++ b/HelloFXML/pom.xml @@ -24,11 +24,17 @@ javafx-controls ${javafx.version} - + org.openjfx javafx-fxml ${javafx.version} + + us.hebi.graalvm + reachability-annotations + 1.0-SNAPSHOT + compile + @@ -37,6 +43,19 @@ org.apache.maven.plugins maven-compiler-plugin 3.8.1 + + + -Aproject=${project.groupId}/${project.artifactId} + -Areachability.outputFormat=1.2.0 + + + + us.hebi.graalvm + reachability-processor + 1.0-SNAPSHOT + + + diff --git a/HelloFXML/src/main/java/hellofx/HelloFXML.java b/HelloFXML/src/main/java/hellofx/HelloFXML.java index ace95202..e5d1fa5b 100755 --- a/HelloFXML/src/main/java/hellofx/HelloFXML.java +++ b/HelloFXML/src/main/java/hellofx/HelloFXML.java @@ -31,10 +31,14 @@ import javafx.scene.Scene; import javafx.scene.layout.AnchorPane; import javafx.stage.Stage; +import us.hebi.graalvm.reachability.annotations.ReachableFxResources; +import us.hebi.graalvm.reachability.annotations.ReachableFxView; import java.io.IOException; import java.util.ResourceBundle; +@ReachableFxView("hello") +@ReachableFxResources("style.css") public class HelloFXML extends Application { @Override diff --git a/HelloFXML/src/main/java/module-info.java b/HelloFXML/src/main/java/module-info.java index 84b453fd..a2624bc9 100644 --- a/HelloFXML/src/main/java/module-info.java +++ b/HelloFXML/src/main/java/module-info.java @@ -27,6 +27,7 @@ module hellofxml { requires javafx.controls; requires javafx.fxml; + requires us.hebi.graalvm.reachability.annotations; opens hellofx to javafx.fxml; diff --git a/alarm/pom.xml b/alarm/pom.xml index f39b9df0..edd5de15 100644 --- a/alarm/pom.xml +++ b/alarm/pom.xml @@ -96,6 +96,12 @@ 2.3.1 runtime + + us.hebi.graalvm + reachability-annotations + ${reachability.version} + provided + @@ -104,6 +110,20 @@ org.apache.maven.plugins maven-compiler-plugin 3.8.1 + + + -Aproject=${project.groupId}/${project.artifactId} + -Areachability.processDependencyInjection=true + -Areachability.outputFormat=1.0.0 + + + + us.hebi.graalvm + reachability-processor + ${reachability.version} + + + diff --git a/alarm/src/main/java/com/gluonhq/samples/alarm/service/Service.java b/alarm/src/main/java/com/gluonhq/samples/alarm/service/Service.java index af903446..606dbfb3 100644 --- a/alarm/src/main/java/com/gluonhq/samples/alarm/service/Service.java +++ b/alarm/src/main/java/com/gluonhq/samples/alarm/service/Service.java @@ -41,6 +41,7 @@ import javafx.beans.property.ListProperty; import javafx.beans.property.SimpleListProperty; import javafx.collections.FXCollections; +import us.hebi.graalvm.reachability.annotations.Reachable; import javax.annotation.PostConstruct; import javax.inject.Singleton; @@ -48,6 +49,7 @@ import java.util.stream.Collectors; @Singleton +@Reachable(resources = "*.png") public class Service { private static final String EVENTS = "events-v1"; diff --git a/alarm/src/main/java/com/gluonhq/samples/alarm/views/AppViewManager.java b/alarm/src/main/java/com/gluonhq/samples/alarm/views/AppViewManager.java index 573dc8ed..248e5b84 100644 --- a/alarm/src/main/java/com/gluonhq/samples/alarm/views/AppViewManager.java +++ b/alarm/src/main/java/com/gluonhq/samples/alarm/views/AppViewManager.java @@ -34,12 +34,19 @@ import com.gluonhq.charm.glisten.control.NavigationDrawer; import com.gluonhq.charm.glisten.visual.MaterialDesignIcon; import javafx.scene.image.Image; +import us.hebi.graalvm.reachability.annotations.Reachable; +import us.hebi.graalvm.reachability.annotations.ReachableFxView; import java.util.Locale; import java.util.ResourceBundle; import static com.gluonhq.charm.glisten.afterburner.AppView.Flag.*; +@ReachableFxView("alarm") +@ReachableFxView("events") +@Reachable(bundles = { + "/com.gluonhq.samples.alarm.drawer", +}) public class AppViewManager { private static final AppViewRegistry REGISTRY = new AppViewRegistry(); diff --git a/beacons/pom.xml b/beacons/pom.xml index 4beae880..c20d1d1d 100644 --- a/beacons/pom.xml +++ b/beacons/pom.xml @@ -69,6 +69,12 @@ util ${attach.version} + + us.hebi.graalvm + reachability-annotations + ${reachability.version} + provided + @@ -77,6 +83,20 @@ org.apache.maven.plugins maven-compiler-plugin 3.8.1 + + + -Aproject=${project.groupId}/${project.artifactId} + -Areachability.processDependencyInjection=true + -Areachability.outputFormat=1.0.0 + + + + us.hebi.graalvm + reachability-processor + ${reachability.version} + + + diff --git a/beacons/src/main/java/com/gluonhq/samples/beacons/Beacons.java b/beacons/src/main/java/com/gluonhq/samples/beacons/Beacons.java index 7d074ed0..e833c2a4 100644 --- a/beacons/src/main/java/com/gluonhq/samples/beacons/Beacons.java +++ b/beacons/src/main/java/com/gluonhq/samples/beacons/Beacons.java @@ -28,13 +28,15 @@ import com.gluonhq.attach.util.Constants; import com.gluonhq.charm.glisten.application.AppManager; -import com.gluonhq.samples.beacons.views.AppViewManager; import com.gluonhq.charm.glisten.visual.Swatch; +import com.gluonhq.samples.beacons.views.AppViewManager; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.image.Image; import javafx.stage.Stage; +import us.hebi.graalvm.reachability.annotations.ReachableFxResources; +@ReachableFxResources("style.css") public class Beacons extends Application { private final AppManager appManager = AppManager.initialize(this::postInit); diff --git a/beacons/src/main/java/com/gluonhq/samples/beacons/views/AppViewManager.java b/beacons/src/main/java/com/gluonhq/samples/beacons/views/AppViewManager.java index a9a27e98..d7951f46 100644 --- a/beacons/src/main/java/com/gluonhq/samples/beacons/views/AppViewManager.java +++ b/beacons/src/main/java/com/gluonhq/samples/beacons/views/AppViewManager.java @@ -34,6 +34,7 @@ import com.gluonhq.charm.glisten.control.NavigationDrawer; import com.gluonhq.charm.glisten.visual.MaterialDesignIcon; import javafx.scene.image.Image; +import us.hebi.graalvm.reachability.annotations.ReachableFxView; import java.util.Locale; @@ -41,6 +42,11 @@ import static com.gluonhq.charm.glisten.afterburner.AppView.Flag.SHOW_IN_DRAWER; import static com.gluonhq.charm.glisten.afterburner.AppView.Flag.SKIP_VIEW_STACK; +@ReachableFxView("main") +@ReachableFxView("beacon") +@ReachableFxView("beacons") +@ReachableFxView("broadcast") +@ReachableFxView("settings") public class AppViewManager { public static final AppViewRegistry REGISTRY = new AppViewRegistry(); diff --git a/cloudlink-cloudfirst-storage/pom.xml b/cloudlink-cloudfirst-storage/pom.xml index f5b477d4..eb187097 100644 --- a/cloudlink-cloudfirst-storage/pom.xml +++ b/cloudlink-cloudfirst-storage/pom.xml @@ -87,6 +87,12 @@ 2.3.1 runtime + + us.hebi.graalvm + reachability-annotations + ${reachability.version} + provided + @@ -95,6 +101,20 @@ org.apache.maven.plugins maven-compiler-plugin 3.8.1 + + + -Aproject=${project.groupId}/${project.artifactId} + -Areachability.processDependencyInjection=true + -Areachability.outputFormat=1.0.0 + + + + us.hebi.graalvm + reachability-processor + ${reachability.version} + + + diff --git a/cloudlink-cloudfirst-storage/src/main/java/com/gluonhq/samples/cloudfirst/views/AppViewManager.java b/cloudlink-cloudfirst-storage/src/main/java/com/gluonhq/samples/cloudfirst/views/AppViewManager.java index 5a5fbdd6..324acff7 100644 --- a/cloudlink-cloudfirst-storage/src/main/java/com/gluonhq/samples/cloudfirst/views/AppViewManager.java +++ b/cloudlink-cloudfirst-storage/src/main/java/com/gluonhq/samples/cloudfirst/views/AppViewManager.java @@ -35,6 +35,8 @@ import com.gluonhq.charm.glisten.visual.MaterialDesignIcon; import com.gluonhq.samples.cloudfirst.CloudFirstStorage; import javafx.scene.image.Image; +import us.hebi.graalvm.reachability.annotations.Reachable; +import us.hebi.graalvm.reachability.annotations.ReachableFxView; import java.util.Locale; @@ -42,6 +44,9 @@ import static com.gluonhq.charm.glisten.afterburner.AppView.Flag.SHOW_IN_DRAWER; import static com.gluonhq.charm.glisten.afterburner.AppView.Flag.SKIP_VIEW_STACK; +@Reachable(resources = "/icon.png") +@ReachableFxView("edition") +@ReachableFxView("notes") public class AppViewManager { public static final AppViewRegistry REGISTRY = new AppViewRegistry(); diff --git a/cloudlink-cloudfirst-storage/src/main/java/module-info.java b/cloudlink-cloudfirst-storage/src/main/java/module-info.java index 9ddcbef8..ef3bfa32 100644 --- a/cloudlink-cloudfirst-storage/src/main/java/module-info.java +++ b/cloudlink-cloudfirst-storage/src/main/java/module-info.java @@ -43,6 +43,7 @@ requires java.json; requires java.annotation; requires afterburner.mfx; + requires us.hebi.graalvm.reachability.annotations; exports com.gluonhq.samples.cloudfirst; exports com.gluonhq.samples.cloudfirst.model to afterburner.mfx; diff --git a/comments/pom.xml b/comments/pom.xml index ffd215c8..eeaba59f 100644 --- a/comments/pom.xml +++ b/comments/pom.xml @@ -86,6 +86,12 @@ util ${attach.version} + + us.hebi.graalvm + reachability-annotations + ${reachability.version} + provided + @@ -109,6 +115,20 @@ org.apache.maven.plugins maven-compiler-plugin 3.8.1 + + + -Aproject=${project.groupId}/${project.artifactId} + -Areachability.processDependencyInjection=true + -Areachability.outputFormat=1.0.0 + + + + us.hebi.graalvm + reachability-processor + ${reachability.version} + + + diff --git a/comments/src/main/java/com/gluonhq/samples/comments/views/AppViewManager.java b/comments/src/main/java/com/gluonhq/samples/comments/views/AppViewManager.java index c2efbbb4..9f090828 100644 --- a/comments/src/main/java/com/gluonhq/samples/comments/views/AppViewManager.java +++ b/comments/src/main/java/com/gluonhq/samples/comments/views/AppViewManager.java @@ -34,6 +34,8 @@ import com.gluonhq.charm.glisten.control.NavigationDrawer; import com.gluonhq.charm.glisten.visual.MaterialDesignIcon; import javafx.scene.image.Image; +import us.hebi.graalvm.reachability.annotations.Reachable; +import us.hebi.graalvm.reachability.annotations.ReachableFxView; import java.util.Locale; @@ -41,14 +43,17 @@ import static com.gluonhq.charm.glisten.afterburner.AppView.Flag.SHOW_IN_DRAWER; import static com.gluonhq.charm.glisten.afterburner.AppView.Flag.SKIP_VIEW_STACK; +@Reachable(resources = "/icon.png") +@ReachableFxView("comments") +@ReachableFxView("edition") public class AppViewManager { public static final AppViewRegistry REGISTRY = new AppViewRegistry(); public static final AppView COMMENTS_VIEW = view("Comments", CommentsPresenter.class, MaterialDesignIcon.COMMENT, SHOW_IN_DRAWER, SKIP_VIEW_STACK, HOME_VIEW); public static final AppView EDITION_VIEW = view("Edition", EditionPresenter.class, MaterialDesignIcon.EDIT, SHOW_IN_DRAWER); - - private static AppView view(String title, Class presenterClass, MaterialDesignIcon menuIcon, AppView.Flag... flags ) { + + private static AppView view(String title, Class presenterClass, MaterialDesignIcon menuIcon, AppView.Flag... flags) { return REGISTRY.createView(name(presenterClass), title, presenterClass, menuIcon, flags); } diff --git a/notes/pom.xml b/notes/pom.xml index 4212df50..3a65952c 100644 --- a/notes/pom.xml +++ b/notes/pom.xml @@ -87,6 +87,12 @@ 2.3.1 runtime + + us.hebi.graalvm + reachability-annotations + ${reachability.version} + provided + @@ -95,6 +101,20 @@ org.apache.maven.plugins maven-compiler-plugin 3.8.1 + + + -Aproject=${project.groupId}/${project.artifactId} + -Areachability.processDependencyInjection=true + -Areachability.outputFormat=1.0.0 + + + + us.hebi.graalvm + reachability-processor + ${reachability.version} + + + diff --git a/notes/src/main/java/com/gluonhq/samples/notes/views/AppViewManager.java b/notes/src/main/java/com/gluonhq/samples/notes/views/AppViewManager.java index a9e55131..9ca8f962 100644 --- a/notes/src/main/java/com/gluonhq/samples/notes/views/AppViewManager.java +++ b/notes/src/main/java/com/gluonhq/samples/notes/views/AppViewManager.java @@ -34,6 +34,8 @@ import com.gluonhq.charm.glisten.control.NavigationDrawer; import com.gluonhq.charm.glisten.visual.MaterialDesignIcon; import javafx.scene.image.Image; +import us.hebi.graalvm.reachability.annotations.Reachable; +import us.hebi.graalvm.reachability.annotations.ReachableFxView; import java.util.Locale; import java.util.ResourceBundle; @@ -42,6 +44,15 @@ import static com.gluonhq.charm.glisten.afterburner.AppView.Flag.SHOW_IN_DRAWER; import static com.gluonhq.charm.glisten.afterburner.AppView.Flag.SKIP_VIEW_STACK; +@Reachable(resources = { + "/icon.png", +}, bundles = { + "/com.gluonhq.samples.notes.drawer", +}) +@ReachableFxView("edition") +@ReachableFxView("filter") +@ReachableFxView("notes") +@ReachableFxView("settings") public class AppViewManager { private static final AppViewRegistry REGISTRY = new AppViewRegistry(); @@ -51,15 +62,15 @@ public class AppViewManager { public static final AppView NOTES_VIEW = view(bundle.getString("view.notes.text"), NotesPresenter.class, MaterialDesignIcon.HOME, SHOW_IN_DRAWER, HOME_VIEW, SKIP_VIEW_STACK); public static final AppView EDITION_VIEW = view(bundle.getString("view.edition.text"), EditionPresenter.class, MaterialDesignIcon.EDIT, SHOW_IN_DRAWER); public static final AppView SETTINGS_VIEW = view(bundle.getString("view.settings.text"), SettingsPresenter.class, MaterialDesignIcon.SETTINGS, SHOW_IN_DRAWER); - - private static AppView view(String title, Class presenterClass, MaterialDesignIcon menuIcon, AppView.Flag... flags ) { + + private static AppView view(String title, Class presenterClass, MaterialDesignIcon menuIcon, AppView.Flag... flags) { return REGISTRY.createView(name(presenterClass), title, presenterClass, menuIcon, flags); } private static String name(Class presenterClass) { return presenterClass.getSimpleName().toUpperCase(Locale.ROOT).replace("PRESENTER", ""); } - + public static void registerViewsAndDrawer() { for (AppView view : REGISTRY.getViews()) { view.registerView(); diff --git a/pom.xml b/pom.xml index ca798d88..2a2d01d0 100644 --- a/pom.xml +++ b/pom.xml @@ -21,6 +21,7 @@ 0.0.8 1.0.29 host + 1.0-SNAPSHOT diff --git a/pushnotes/pom.xml b/pushnotes/pom.xml index a89056d7..1dc9b72e 100644 --- a/pushnotes/pom.xml +++ b/pushnotes/pom.xml @@ -101,6 +101,12 @@ 2.3.1 runtime + + us.hebi.graalvm + reachability-annotations + ${reachability.version} + provided + @@ -109,6 +115,20 @@ org.apache.maven.plugins maven-compiler-plugin 3.8.1 + + + -Aproject=${project.groupId}/${project.artifactId} + -Areachability.processDependencyInjection=true + -Areachability.outputFormat=1.0.0 + + + + us.hebi.graalvm + reachability-processor + ${reachability.version} + + + diff --git a/pushnotes/src/main/java/com/gluonhq/samples/pushnotes/views/AppViewManager.java b/pushnotes/src/main/java/com/gluonhq/samples/pushnotes/views/AppViewManager.java index caa90bb2..a4c2d129 100644 --- a/pushnotes/src/main/java/com/gluonhq/samples/pushnotes/views/AppViewManager.java +++ b/pushnotes/src/main/java/com/gluonhq/samples/pushnotes/views/AppViewManager.java @@ -34,6 +34,8 @@ import com.gluonhq.charm.glisten.control.NavigationDrawer; import com.gluonhq.charm.glisten.visual.MaterialDesignIcon; import javafx.scene.image.Image; +import us.hebi.graalvm.reachability.annotations.Reachable; +import us.hebi.graalvm.reachability.annotations.ReachableFxView; import java.util.Locale; import java.util.ResourceBundle; @@ -42,6 +44,15 @@ import static com.gluonhq.charm.glisten.afterburner.AppView.Flag.SHOW_IN_DRAWER; import static com.gluonhq.charm.glisten.afterburner.AppView.Flag.SKIP_VIEW_STACK; +@Reachable(resources = { + "/icon.png", +}, bundles = { + "/com.gluonhq.samples.pushnotes.drawer", +}) +@ReachableFxView("edition") +@ReachableFxView("filter") +@ReachableFxView("notes") +@ReachableFxView("settings") public class AppViewManager { private static final AppViewRegistry REGISTRY = new AppViewRegistry(); From 8f05df7b17be7ffc3c921fdfbb65dbeb6bc65416 Mon Sep 17 00:00:00 2001 From: Florian Enner Date: Thu, 16 Jul 2026 15:26:30 +0200 Subject: [PATCH 2/2] updated to public maven version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2a2d01d0..42c7192c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ 0.0.8 1.0.29 host - 1.0-SNAPSHOT + 1.0.0-RC1