Skip to content

Commit 46c7cb6

Browse files
committed
Add shadow jar plugin and support
Current jar files built do not have the libraries included when built. Shadow plugin allows easy building of the project with the necessary libraries included. Let's add support for the plugin and also fix issues with system fonts when building the jar files.
1 parent 78b3ac4 commit 46c7cb6

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ test {
4545
}
4646

4747
application {
48-
mainClassName = "duke.Duke"
48+
mainClassName = "duke.Launcher"
4949
}
5050

5151
shadowJar {

data/tasks.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ T|1|hi
22
T|1|hi
33
T|1|hi
44
T|0|hi
5-
T|0|hi
5+
T|1|hi
66
T|0|me

src/main/resources/view/DialogBox.fxml

+7-3
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,20 @@
44
<?import javafx.scene.control.Label?>
55
<?import javafx.scene.image.ImageView?>
66
<?import javafx.scene.layout.HBox?>
7+
<?import javafx.scene.text.Font?>
78

8-
<fx:root alignment="CENTER_RIGHT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefWidth="400.0" type="javafx.scene.layout.HBox" xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1">
9+
<fx:root alignment="CENTER_RIGHT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefWidth="400.0" type="javafx.scene.layout.HBox" xmlns="http://javafx.com/javafx/11" xmlns:fx="http://javafx.com/fxml/1">
910
<children>
10-
<Label fx:id="dialog" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" text="Label" wrapText="true">
11+
<Label fx:id="dialog" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" text="Label">
1112
<padding>
1213
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
1314
</padding>
1415
<HBox.margin>
1516
<Insets />
16-
</HBox.margin></Label>
17+
</HBox.margin>
18+
<font>
19+
<Font name="Arial" size="11.0" />
20+
</font></Label>
1721
<ImageView fx:id="displayPicture" fitHeight="99.0" fitWidth="99.0" pickOnBounds="true" preserveRatio="true" />
1822
</children>
1923
<padding>

src/main/resources/view/MainWindow.fxml

+7-3
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,19 @@
55
<?import javafx.scene.control.TextField?>
66
<?import javafx.scene.layout.AnchorPane?>
77
<?import javafx.scene.layout.VBox?>
8+
<?import javafx.scene.text.Font?>
89

9-
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="400.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="duke.MainWindow">
10+
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="400.0" xmlns="http://javafx.com/javafx/11" xmlns:fx="http://javafx.com/fxml/1" fx:controller="duke.MainWindow">
1011
<children>
1112
<TextField fx:id="userInput" layoutY="558.0" onAction="#handleUserInput" prefHeight="41.0" prefWidth="324.0" AnchorPane.bottomAnchor="1.0" />
12-
<Button fx:id="sendButton" layoutX="324.0" layoutY="558.0" mnemonicParsing="false" onAction="#handleUserInput" prefHeight="41.0" prefWidth="76.0" text="Send" />
13+
<Button fx:id="sendButton" layoutX="324.0" layoutY="558.0" mnemonicParsing="false" onAction="#handleUserInput" prefHeight="41.0" prefWidth="76.0" text="Send">
14+
<font>
15+
<Font name="Arial" size="11.0" />
16+
</font></Button>
1317
<ScrollPane fx:id="scrollPane" hbarPolicy="NEVER" hvalue="1.0" prefHeight="557.0" prefWidth="400.0" vvalue="1.0">
1418
<content>
1519
<VBox fx:id="dialogContainer" prefHeight="552.0" prefWidth="388.0" />
1620
</content>
1721
</ScrollPane>
1822
</children>
19-
</AnchorPane>
23+
</AnchorPane>

0 commit comments

Comments
 (0)