I've finally have a working "Java-GI application template" with working localization, settings, desktop file, manifest, icons, etc, that can be distributed as a Flatpak. It's available here:
https://github.com/jwharm/java-gi-app-template
The application uses Gradle to build the source code, and Meson to install settings, resources, translations etc. Currently, both build systems are triggered separately from the Flatpak manifest. I will try to improve this, so that meson triggers the gradle build (or vice versa).
The screenshot shows the dutch (nl) translation that demonstrates the gettext integration.
