Skip to content

Commit

Permalink
Update build.gradle and minor changes on GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiheng0410 committed Feb 21, 2021
1 parent 0e4cac1 commit 12ce08c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 47 deletions.
57 changes: 16 additions & 41 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,50 +1,25 @@
plugins {
id 'java'
id 'checkstyle'
id 'com.github.johnrengelman.shadow' version '4.0.4'
id 'application'
id 'jacoco'
id 'checkstyle'
id 'com.github.johnrengelman.shadow' version '5.1.0'
}

mainClassName = 'Duke'
group 'org.example'
version '1.0'

sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11


repositories {
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}

checkstyle {
toolVersion = '8.29'
}

test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}

task coverage(type: JacocoReport) {
sourceDirectories.from files(sourceSets.main.allSource.srcDirs)
classDirectories.from files(sourceSets.main.output)
executionData.from files(jacocoTestReport.executionData)
afterEvaluate {
classDirectories.from files(classDirectories.files.collect {
fileTree(dir: it, exclude: ['**/*.jar'])
})
}
reports {
html.enabled = true
xml.enabled = true
}
}

dependencies {
implementation 'org.testng:testng:6.14.3'
implementation 'org.junit.jupiter:junit-jupiter:5.4.2'
String jUnitVersion = '5.4.0'
String Shadow = '11'
testCompile group: 'junit', name: 'junit', version: '4.12'

//JavaFX dependencies
String javaFxVersion = '11'

implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'win'
Expand All @@ -59,17 +34,17 @@ dependencies {
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'
}

implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.7.0'
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.7.4'

testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: jUnitVersion
checkstyle {
toolVersion = '8.29'
}

testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: jUnitVersion
application {
mainClassName = "Launcher"
}

shadowJar {
archiveName = 'Duke.jar'
archiveBaseName = "Duke"
archiveClassifier = null
}

defaultTasks 'clean', 'test'
2 changes: 0 additions & 2 deletions data/duke.txt
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
D|0|finish assign 1|2020-02-21
E|0|attend meeting|2020-03-01
1 change: 0 additions & 1 deletion src/main/java/Duke.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
public class Duke {

static final String PATH = "/data/duke.txt";
static final String HELLO = " Hello! I'm Duke\n" + " What can I do for you?";
static final String BYE = " Bye. Hope to see you again soon!";


Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/view/DialogBox.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

<fx:root alignment="TOP_RIGHT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefWidth="400.0" type="javafx.scene.layout.HBox" xmlns="http://javafx.com/javafx/15.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Label fx:id="dialog" minHeight="-Infinity" text="Label" textFill="honeydew" wrapText="true">
<Label fx:id="dialog" minHeight="-Infinity" text="Label" textFill="darkgoldenrod" wrapText="true">
<font>
<Font name="System Bold" size="20.0" />
<Font name="Bold" size="20.0" />
</font></Label>
<ImageView fx:id="displayPicture" fitHeight="99.0" fitWidth="99.0" pickOnBounds="true" preserveRatio="true" />
</children>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/view/MainWindow.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Button fx:id="sendButton" layoutX="271.0" layoutY="558.0" mnemonicParsing="false" onAction="#handleUserInput" prefHeight="42.0" prefWidth="130.0" style="-fx-background-color: #286bc9;" text="Send" textFill="#fffbfb" />
<ScrollPane fx:id="scrollPane" hbarPolicy="NEVER" hvalue="1.0" prefHeight="557.0" prefWidth="400.0" vvalue="1.0">
<content>
<VBox fx:id="dialogContainer" prefHeight="558.0" prefWidth="399.0" style="-fx-background-image: url('/images/background.png');" />
<VBox fx:id="dialogContainer" prefHeight="558.0" prefWidth="399.0" style="-fx-background-image: url('/images/Background.PNG');" />
</content>
</ScrollPane>
</children>
Expand Down

0 comments on commit 12ce08c

Please sign in to comment.