Skip to content

Commit

Permalink
Fix style and bug for jar file
Browse files Browse the repository at this point in the history
  • Loading branch information
ph-nathan committed Sep 28, 2023
1 parent c5fa579 commit 2cdd849
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
29 changes: 13 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,19 @@ repositories {
}

dependencies {
String javaFxVersion = '17.0.7'

implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'linux'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.10.0'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.10.0'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'

// Used for loops to clean up the imports
def platforms = ["win", "linux", "mac"]
def javafxDependency = ["javafx-graphics", "javafx-controls", "javafx-fxml"]

for (plt in platforms) {
for (dep in javafxDependency) {
runtimeOnly "org.openjfx:$dep:$javafx.version:$plt"
}
}
}

test {
Expand All @@ -53,8 +50,8 @@ shadowJar {
}

javafx {
version = "17"
modules = [ 'javafx.controls', 'javafx.fxml' ]
version = '17.0.7'
modules = ['javafx.base', 'javafx.controls', 'javafx.fxml', 'javafx.graphics']
}

checkstyle {
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/pippi/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public class MainWindow extends AnchorPane {
private Image userImage = new Image(this.getClass().getResourceAsStream("/images/DaUser-removebg.png"));
private Image pippiImage = new Image(this.getClass().getResourceAsStream("/images/DaPippi-removebg.png"));

/**
* Initializes the program with hello message and scrollPane
*/
@FXML
public void initialize() {
dialogContainer.getChildren().add(DialogBox.getPippiDialog(Ui.helloMessage(), pippiImage));
Expand Down
1 change: 0 additions & 1 deletion src/main/java/pippi/parser/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.util.ArrayList;

import pippi.PippiException;
import pippi.storage.Storage;
import pippi.task.Deadline;
import pippi.task.Event;
Expand Down

0 comments on commit 2cdd849

Please sign in to comment.