Commit 5b049705 authored by Hallvard Trætteberg's avatar Hallvard Trætteberg
Browse files

Configure for client-maven-plugin

parent e41f4d4d
......@@ -2,6 +2,11 @@ FROM gitpod/workspace-full-vnc
USER gitpod
RUN wget https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-20.2.0/graalvm-ce-java11-linux-amd64-20.2.0.tar.gz && \
tar -xf graalvm-ce-java11-linux-amd64-20.2.0.tar.gz && \
rm graalvm-ce-java11-linux-amd64-20.2.0.tar.gz
ENV GRAALVM_HOME=$HOME/graalvm-ce-java11-20.2.0
RUN $GRAALVM_HOME/bin/gu install native-image
RUN bash -c ". /home/gitpod/.sdkman/bin/sdkman-init.sh \
&& sdk install java 14.0.2.j9-adpt \
&& sdk default java 14.0.2.j9-adpt"
&& sdk install java graal-20+2 $GRAALVM_HOME \
&& sdk default java graal-20+2"
......@@ -13,6 +13,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.class>todolist.ui.TodoApp</main.class>
</properties>
<dependencies>
......@@ -81,7 +82,7 @@
<version>3.8.1</version>
<configuration>
<encoding>UTF-8</encoding>
<release>14</release>
<release>11</release>
<compilerArgs>
<!--
<arg>dash dash enable-preview</arg>
......@@ -109,7 +110,7 @@
<option>dash dash enable-preview</option>
-->
</options>
<mainClass>todolist.ui.TodoApp</mainClass>
<mainClass>${main.class}</mainClass>
</configuration>
</plugin>
......@@ -178,6 +179,58 @@
</execution>
</executions>
</plugin>
</plugins>
<!--
Support generating native apps for various platforms
-->
<plugin>
<groupId>com.gluonhq</groupId>
<artifactId>client-maven-plugin</artifactId>
<version>0.1.31</version>
<configuration>
<target>${client.target}</target>
<mainClass>${main.class}</mainClass>
<bundlesList>
<list>todolist.ui.App</list>
</bundlesList>
<reflectionList>
<list>todolist.ui.TodoController</list>
<list>no.hal.timers.fxui.AppController</list>
<list>javafx.scene.control.Button</list>
<list>javafx.scene.control.TextField</list>
<list>javafx.scene.control.ListView</list>
<list>javafx.scene.layout.HBox</list>
<list>javafx.scene.layout.VBox</list>
</reflectionList>
</configuration>
</plugin>
</plugins>
</build>
<!--
Used by client-maven-plugin
-->
<profiles>
<profile>
<id>desktop</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<client.target>host</client.target>
</properties>
</profile>
<profile>
<id>android</id>
<properties>
<client.target>android</client.target>
</properties>
</profile>
<profile>
<id>ios</id>
<properties>
<client.target>ios</client.target>
</properties>
</profile>
</profiles>
</project>
\ No newline at end of file
package todolist.ui;
import java.util.ResourceBundle;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
......@@ -10,7 +11,7 @@ public class TodoApp extends Application {
@Override
public void start(Stage stage) throws Exception {
Parent parent = FXMLLoader.load(getClass().getResource("Todo.fxml"));
Parent parent = FXMLLoader.load(getClass().getResource("Todo.fxml"), ResourceBundle.getBundle("todolist.ui.App"));
stage.setScene(new Scene(parent));
stage.show();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment