Skip to content
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.

Commit

Permalink
Merge 3bb2568 into 52eb022
Browse files Browse the repository at this point in the history
  • Loading branch information
fzdy1914 committed Apr 24, 2019
2 parents 52eb022 + 3bb2568 commit 6b83424
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 31 deletions.
7 changes: 1 addition & 6 deletions .travis.yml
@@ -1,7 +1,7 @@
language: java
matrix:
include:
- jdk: oraclejdk8
- jdk: oraclejdk11

script: >-
./config/travis/run-checks.sh &&
Expand All @@ -14,11 +14,6 @@ deploy:
on:
branch: master

addons:
apt:
packages:
- oracle-java8-installer

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Expand Up @@ -35,6 +35,6 @@ endif::[]

* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by
_Marco Jakob_.
* Libraries used: https://github.com/TestFX/TestFX[TestFX], https://github.com/FasterXML/jackson[Jackson], https://github.com/junit-team/junit5[JUnit5]
* Libraries used: https://openjfx.io/[JavaFX], https://github.com/TestFX/TestFX[TestFX], https://github.com/FasterXML/jackson[Jackson], https://github.com/junit-team/junit5[JUnit5]

== Licence : link:LICENSE[MIT]
2 changes: 1 addition & 1 deletion appveyor.yml
Expand Up @@ -11,7 +11,7 @@ test_script:
- gradlew.bat --no-daemon headless allTests

environment:
JAVA_HOME: C:\Program Files\Java\jdk1.8.0 # Use 64-bit Java
JAVA_HOME: C:\Program Files\Java\jdk11 # Use 64-bit Java

# Files/folders to preserve between builds to speed them up
cache:
Expand Down
28 changes: 24 additions & 4 deletions build.gradle
Expand Up @@ -15,10 +15,10 @@ plugins {
}

// Specifies the entry point of the application
mainClassName = 'seedu.address.MainApp'
mainClassName = 'seedu.address.Main'

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

repositories {
mavenCentral()
Expand All @@ -44,6 +44,26 @@ test {
dependencies {
String testFxVersion = '4.0.15-alpha'
String jUnitVersion = '5.1.0'
String javaFxVersion = '11'

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'
implementation group: 'org.openjfx', name: 'javafx-media', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-media', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-media', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-web', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-web', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-web', 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'
Expand All @@ -54,7 +74,7 @@ dependencies {

testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: jUnitVersion

testRuntimeOnly group: 'org.testfx', name: 'openjfx-monocle', version: '8u76-b04'
testRuntimeOnly group: 'org.testfx', name: 'openjfx-monocle', version: 'jdk-11+26'
testRuntimeOnly group:'org.junit.vintage', name:'junit-vintage-engine', version: jUnitVersion
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: jUnitVersion
}
Expand Down
2 changes: 1 addition & 1 deletion config/checkstyle/checkstyle.xml
Expand Up @@ -26,7 +26,7 @@
</module>

<module name="SuppressionFilter">
<property name="file" value="config/checkstyle/suppressions.xml"/>
<property name="file" value="${config_loc}/suppressions.xml"/>
</module>


Expand Down
9 changes: 2 additions & 7 deletions docs/DeveloperGuide.adoc
Expand Up @@ -20,12 +20,7 @@ By: `Team SE-EDU`      Since: `Jun 2016`      Licence: `MIT`

=== Prerequisites

. *JDK `8`* (revision `1.8.0_201` or later)
+
[NOTE]
Only JDK 8 is supported. +
This app will not work with later major JDK releases such as JDK 9, 10, 11, etc.
+
. *JDK `11`* or above
. *IntelliJ* IDE
+
[NOTE]
Expand Down Expand Up @@ -881,7 +876,7 @@ _{More to be added}_
[appendix]
== Non Functional Requirements

. Should work on any <<mainstream-os,mainstream OS>> as long as it has Java `8` (revision `1.8.0_201` or higher) installed.
. Should work on any <<mainstream-os,mainstream OS>> as long as it has Java `11` or above installed.
. Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage.
. A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.

Expand Down
7 changes: 1 addition & 6 deletions docs/UserGuide.adoc
Expand Up @@ -22,12 +22,7 @@ AddressBook Level 4 (AB4) is for those who *prefer to use a desktop app for mana

== Quick Start

. Ensure you have Java `8` (revision `1.8.0_201` or later) installed in your Computer.
+
[NOTE]
Only Java 8 is supported. +
This app will not work with later major Java releases such as Java 9, 10, 11, etc.
+
. Ensure you have Java `11` or above installed in your Computer.
. Download the latest `addressbook.jar` link:{repoURL}/releases[here].
. Copy the file to the folder you want to use as the home folder for your Address Book.
. Double-click the file to start the app. The GUI should appear in a few seconds.
Expand Down
4 changes: 4 additions & 0 deletions gradle.properties
@@ -1,2 +1,6 @@
org.gradle.parallel=false
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -Dfile.encoding=utf-8

# TODO: This is a workaround for a JDK11 bug which causes test coverage upload to fail.
# Remove it when https://bugs.openjdk.java.net/browse/JDK-8221253 is fixed.
systemProp.jdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2"
25 changes: 25 additions & 0 deletions src/main/java/seedu/address/Main.java
@@ -0,0 +1,25 @@
package seedu.address;

import javafx.application.Application;

/**
* The main entry point to the application.
*
* This is a workaround for the following error when MainApp is made the
* entry point of the application:
*
* Error: JavaFX runtime components are missing, and are required to run this application
*
* The reason is that MainApp extends Application. In that case, the
* LauncherHelper will check for the javafx.graphics module to be present
* as a named module. We don't use JavaFX via the module system so it can't
* find the javafx.graphics module, and so the launch is aborted.
*
* By having a separate main class (Main) that doesn't extend Application
* to be the entry point of the application, we avoid this issue.
*/
public class Main {
public static void main(String[] args) {
Application.launch(MainApp.class, args);
}
}
6 changes: 1 addition & 5 deletions src/main/java/seedu/address/MainApp.java
Expand Up @@ -32,7 +32,7 @@
import seedu.address.ui.UiManager;

/**
* The main entry point to the application.
* Runs the application.
*/
public class MainApp extends Application {

Expand Down Expand Up @@ -180,8 +180,4 @@ public void stop() {
logger.severe("Failed to save preferences " + StringUtil.getDetails(e));
}
}

public static void main(String[] args) {
launch(args);
}
}
9 changes: 9 additions & 0 deletions src/test/java/seedu/address/ui/GuiUnitTest.java
Expand Up @@ -13,6 +13,15 @@
* A GUI unit test class for AddressBook.
*/
public abstract class GuiUnitTest {
// TODO: Remove this workaround after using JavaFX version 13 or above
// This is a workaround to solve headless test failure on Windows OS
// Refer to https://github.com/javafxports/openjdk-jfx/issues/66 for more details.
static {
if (System.getProperty("os.name").toLowerCase().startsWith("win")) {
System.loadLibrary("WindowsCodecs");
}
}

@Rule
public final UiPartRule uiPartRule = new UiPartRule();

Expand Down
9 changes: 9 additions & 0 deletions src/test/java/systemtests/AddressBookSystemTest.java
Expand Up @@ -45,6 +45,15 @@
* for test verification.
*/
public abstract class AddressBookSystemTest {
// TODO: Remove this workaround after using JavaFX version 13 or above
// This is a workaround to solve headless test failure on Windows OS
// Refer to https://github.com/javafxports/openjdk-jfx/issues/66 for more details.
static {
if (System.getProperty("os.name").toLowerCase().startsWith("win")) {
System.loadLibrary("WindowsCodecs");
}
}

@ClassRule
public static ClockRule clockRule = new ClockRule();

Expand Down

0 comments on commit 6b83424

Please sign in to comment.