Open ptvrajsk opened 5 years ago
Can you provide the entire message instead of the screenshot? Thanks.
It would be helpful if you could follow the instructions mentioned here: https://nus-cs2103-ay1819s2.github.io/cs2103-website/admin/appendixB-policies.html#policy-techHelp when you post your questions.
Apologies, Here is the full message. I've asked around and searched online but it would seem that no-one that I am aware of has encountered this issue. Thanks for the assistance!
❱ ./gradlew clean shadowJar
> Task :compileJava FAILED
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/CommandBox.java:5: error: package javafx.collections does not exist
import javafx.collections.ObservableList;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/CommandBox.java:6: error: package javafx.fxml does not exist
import javafx.fxml.FXML;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/CommandBox.java:7: error: package javafx.scene.control does not exist
import javafx.scene.control.TextField;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/CommandBox.java:8: error: package javafx.scene.input does not exist
import javafx.scene.input.KeyEvent;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/CommandBox.java:9: error: package javafx.scene.layout does not exist
import javafx.scene.layout.Region;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/UiPart.java:8: error: package javafx.fxml does not exist
import javafx.fxml.FXMLLoader;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/CommandBox.java:17: error: cannot find symbol
public class CommandBox extends UiPart<Region> {
^
symbol: class Region
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/CommandBox.java:27: error: cannot find symbol
private TextField commandTextField;
^
symbol: class TextField
location: class CommandBox
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/CommandBox.java:42: error: cannot find symbol
private void handleKeyPress(KeyEvent keyEvent) {
^
symbol: class KeyEvent
location: class CommandBox
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/UiPart.java:20: error: cannot find symbol
private final FXMLLoader fxmlLoader = new FXMLLoader();
^
symbol: class FXMLLoader
location: class UiPart<T>
where T is a type-variable:
T extends Object declared in class UiPart
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/BrowserPanel.java:9: error: package javafx.beans.value does not exist
import javafx.beans.value.ObservableValue;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/BrowserPanel.java:10: error: package javafx.fxml does not exist
import javafx.fxml.FXML;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/BrowserPanel.java:11: error: package javafx.scene.control does not exist
import javafx.scene.control.Label;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/BrowserPanel.java:12: error: package javafx.scene.layout does not exist
import javafx.scene.layout.Region;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/BrowserPanel.java:13: error: package javafx.scene.layout does not exist
import javafx.scene.layout.VBox;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/BrowserPanel.java:22: error: cannot find symbol
public class BrowserPanel extends UiPart<Region> {
^
symbol: class Region
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/BrowserPanel.java:31: error: cannot find symbol
private VBox initial;
^
symbol: class VBox
location: class BrowserPanel
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/BrowserPanel.java:34: error: cannot find symbol
private Label deadlines;
^
symbol: class Label
location: class BrowserPanel
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/BrowserPanel.java:37: error: cannot find symbol
private VBox selected;
^
symbol: class VBox
location: class BrowserPanel
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/BrowserPanel.java:40: error: cannot find symbol
private Label selectedName;
^
symbol: class Label
location: class BrowserPanel
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/BrowserPanel.java:43: error: cannot find symbol
private Label selectedDirectory;
^
symbol: class Label
location: class BrowserPanel
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/BrowserPanel.java:46: error: cannot find symbol
private Label selectedSize;
^
symbol: class Label
location: class BrowserPanel
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/BrowserPanel.java:49: error: cannot find symbol
private Label selectedDeadline;
^
symbol: class Label
location: class BrowserPanel
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/BrowserPanel.java:56: error: cannot find symbol
public BrowserPanel(ObservableValue<Pdf> selectedPerson, List<Pdf> duePdfs) {
^
symbol: class ObservableValue
location: class BrowserPanel
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/commons/util/AppUtil.java:5: error: package javafx.scene.image does not exist
import javafx.scene.image.Image;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/commons/util/AppUtil.java:13: error: cannot find symbol
public static Image getImage(String imagePath) {
^
symbol: class Image
location: class AppUtil
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/UiManager.java:5: error: package javafx.application does not exist
import javafx.application.Platform;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/UiManager.java:6: error: package javafx.scene.control does not exist
import javafx.scene.control.Alert;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/UiManager.java:7: error: package javafx.scene.control.Alert does not exist
import javafx.scene.control.Alert.AlertType;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/UiManager.java:8: error: package javafx.scene.image does not exist
import javafx.scene.image.Image;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/UiManager.java:9: error: package javafx.stage does not exist
import javafx.stage.Stage;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/Ui.java:3: error: package javafx.stage does not exist
import javafx.stage.Stage;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/logic/Logic.java:6: error: package javafx.beans.property does not exist
import javafx.beans.property.ReadOnlyProperty;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/logic/Logic.java:7: error: package javafx.collections does not exist
import javafx.collections.ObservableList;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:5: error: package javafx.event does not exist
import javafx.event.ActionEvent;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:6: error: package javafx.fxml does not exist
import javafx.fxml.FXML;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:7: error: package javafx.scene.control does not exist
import javafx.scene.control.MenuItem;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:8: error: package javafx.scene.control does not exist
import javafx.scene.control.TextInputControl;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:9: error: package javafx.scene.input does not exist
import javafx.scene.input.KeyCombination;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:10: error: package javafx.scene.input does not exist
import javafx.scene.input.KeyEvent;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:11: error: package javafx.scene.layout does not exist
import javafx.scene.layout.StackPane;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:12: error: package javafx.stage does not exist
import javafx.stage.Stage;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:24: error: cannot find symbol
public class MainWindow extends UiPart<Stage> {
^
symbol: class Stage
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/UiManager.java:34: error: cannot find symbol
public void start(Stage primaryStage) {
^
symbol: class Stage
location: class UiManager
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/UiManager.java:51: error: cannot find symbol
private Image getImage(String imagePath) {
^
symbol: class Image
location: class UiManager
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/UiManager.java:55: error: package Alert does not exist
void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/UiManager.java:63: error: cannot find symbol
private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,
^
symbol: class Stage
location: class UiManager
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/UiManager.java:63: error: cannot find symbol
private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,
^
symbol: class AlertType
location: class UiManager
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:30: error: cannot find symbol
private Stage primaryStage;
^
symbol: class Stage
location: class MainWindow
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/PersonListPanel.java:7: error: package javafx.beans.value does not exist
import javafx.beans.value.ObservableValue;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/PersonListPanel.java:8: error: package javafx.collections does not exist
import javafx.collections.ObservableList;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/PersonListPanel.java:9: error: package javafx.fxml does not exist
import javafx.fxml.FXML;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/PersonListPanel.java:10: error: package javafx.scene.control does not exist
import javafx.scene.control.ListCell;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/PersonListPanel.java:11: error: package javafx.scene.control does not exist
import javafx.scene.control.ListView;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/PersonListPanel.java:12: error: package javafx.scene.layout does not exist
import javafx.scene.layout.Region;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/PersonListPanel.java:19: error: cannot find symbol
public class PersonListPanel extends UiPart<Region> {
^
symbol: class Region
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/ResultDisplay.java:5: error: package javafx.fxml does not exist
import javafx.fxml.FXML;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/ResultDisplay.java:6: error: package javafx.scene.control does not exist
import javafx.scene.control.TextArea;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/ResultDisplay.java:7: error: package javafx.scene.layout does not exist
import javafx.scene.layout.Region;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/ResultDisplay.java:12: error: cannot find symbol
public class ResultDisplay extends UiPart<Region> {
^
symbol: class Region
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/HelpWindow.java:8: error: package javafx.fxml does not exist
import javafx.fxml.FXML;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/HelpWindow.java:9: error: package javafx.scene.web does not exist
import javafx.scene.web.WebView;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/HelpWindow.java:10: error: package javafx.stage does not exist
import javafx.stage.Stage;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/HelpWindow.java:16: error: cannot find symbol
public class HelpWindow extends UiPart<Stage> {
^
symbol: class Stage
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:40: error: cannot find symbol
private StackPane browserPlaceholder;
^
symbol: class StackPane
location: class MainWindow
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:43: error: cannot find symbol
private StackPane commandBoxPlaceholder;
^
symbol: class StackPane
location: class MainWindow
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:46: error: cannot find symbol
private MenuItem helpMenuItem;
^
symbol: class MenuItem
location: class MainWindow
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:49: error: cannot find symbol
private StackPane personListPanelPlaceholder;
^
symbol: class StackPane
location: class MainWindow
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:52: error: cannot find symbol
private StackPane resultDisplayPlaceholder;
^
symbol: class StackPane
location: class MainWindow
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:55: error: cannot find symbol
private StackPane statusbarPlaceholder;
^
symbol: class StackPane
location: class MainWindow
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:57: error: cannot find symbol
public MainWindow(Stage primaryStage, Logic logic) {
^
symbol: class Stage
location: class MainWindow
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:72: error: cannot find symbol
public Stage getPrimaryStage() {
^
symbol: class Stage
location: class MainWindow
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:84: error: cannot find symbol
private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {
^
symbol: class MenuItem
location: class MainWindow
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/MainWindow.java:84: error: cannot find symbol
private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {
^
symbol: class KeyCombination
location: class MainWindow
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/HelpWindow.java:24: error: cannot find symbol
private WebView browser;
^
symbol: class WebView
location: class HelpWindow
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/HelpWindow.java:31: error: cannot find symbol
public HelpWindow(Stage root) {
^
symbol: class Stage
location: class HelpWindow
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/ResultDisplay.java:17: error: cannot find symbol
private TextArea resultDisplay;
^
symbol: class TextArea
location: class ResultDisplay
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/PersonListPanel.java:24: error: cannot find symbol
private ListView<Pdf> personListView;
^
symbol: class ListView
location: class PersonListPanel
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/PersonListPanel.java:26: error: cannot find symbol
public PersonListPanel(ObservableList<Pdf> pdfList, ObservableValue<Pdf> selectedPerson,
^
symbol: class ObservableList
location: class PersonListPanel
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/PersonListPanel.java:26: error: cannot find symbol
public PersonListPanel(ObservableList<Pdf> pdfList, ObservableValue<Pdf> selectedPerson,
^
symbol: class ObservableValue
location: class PersonListPanel
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/model/ReadOnlyPdfBook.java:3: error: package javafx.beans does not exist
import javafx.beans.Observable;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/model/ReadOnlyPdfBook.java:4: error: package javafx.collections does not exist
import javafx.collections.ObservableList;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/model/ReadOnlyPdfBook.java:10: error: cannot find symbol
public interface ReadOnlyPdfBook extends Observable {
^
symbol: class Observable
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/logic/Logic.java:36: error: cannot find symbol
ObservableList<Pdf> getFilteredPersonList();
^
symbol: class ObservableList
location: interface Logic
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/logic/Logic.java:42: error: cannot find symbol
ObservableList<String> getHistory();
^
symbol: class ObservableList
location: interface Logic
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/logic/Logic.java:65: error: cannot find symbol
ReadOnlyProperty<Pdf> selectedPersonProperty();
^
symbol: class ReadOnlyProperty
location: interface Logic
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/model/ReadOnlyPdfBook.java:16: error: cannot find symbol
ObservableList<Pdf> getPdfList();
^
symbol: class ObservableList
location: interface ReadOnlyPdfBook
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/Ui.java:11: error: cannot find symbol
void start(Stage primaryStage);
^
symbol: class Stage
location: interface Ui
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/StatusBarFooter.java:8: error: package javafx.fxml does not exist
import javafx.fxml.FXML;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/StatusBarFooter.java:9: error: package javafx.scene.control does not exist
import javafx.scene.control.Label;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/StatusBarFooter.java:10: error: package javafx.scene.layout does not exist
import javafx.scene.layout.Region;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/StatusBarFooter.java:16: error: cannot find symbol
public class StatusBarFooter extends UiPart<Region> {
^
symbol: class Region
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/StatusBarFooter.java:34: error: cannot find symbol
private Label syncStatus;
^
symbol: class Label
location: class StatusBarFooter
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/StatusBarFooter.java:36: error: cannot find symbol
private Label saveLocationStatus;
^
symbol: class Label
location: class StatusBarFooter
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/PersonListPanel.java:57: error: cannot find symbol
class PersonListViewCell extends ListCell<Pdf> {
^
symbol: class ListCell
location: class PersonListPanel
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/PersonCard.java:5: error: package javafx.fxml does not exist
import javafx.fxml.FXML;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/PersonCard.java:6: error: package javafx.geometry does not exist
import javafx.geometry.Insets;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/PersonCard.java:7: error: package javafx.scene.control does not exist
import javafx.scene.control.Label;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/PersonCard.java:8: error: package javafx.scene.layout does not exist
import javafx.scene.layout.FlowPane;
^
/Users/prithiviraj/Repositories/CS2103T/main/src/main/java/seedu/address/ui/PersonCard.java:9: error: package javafx.scene.layout does not exist
import javafx.scene.layout.HBox;
^
100 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.8.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2s
2 actionable tasks: 2 executed
Your compilation failed.
Have you tried to compile manually?
If you have, most probably you have not configure shadow properly to compile the code.
Hi, yes our manual compile passes and compilation on Travis passes as well. This only happens on using shadowJar. We looked at the shadowJar site and attempted a couple of their suggestions to no avail.
We are not entirely sure about how else to configure it. We've compared a couple of build.gradle
files with our peers as well. There are no marked differences apart from some external library inclusions in the dependencies area.
Attached below is the build.gradle file for reference. Thank you.
// Gradle Configuration File
// For more details take a look at the Java Quickstart chapter in the Gradle
// user guide available at http://gradle.org/docs/4.8.1/userguide/tutorial_java_projects.html
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
id 'java'
id 'jacoco'
id 'checkstyle'
id 'com.github.kt3k.coveralls' version '2.4.0'
id 'com.github.johnrengelman.shadow' version '2.0.3'
id 'org.asciidoctor.convert' version '1.5.6'
id 'application'
}
if (JavaVersion.current() == JavaVersion.VERSION_1_10
&& System.getProperty('os.name').startsWith('Windows')) {
logger.warn('''\
==============================================================================
*********************************** WARNING **********************************
==============================================================================
You seem to be running Gradle with JDK 10 on Windows.
JDK 10 on Windows will fail to run tests in headless mode due to a JavaFX bug.
You are highly recommended to use JDK 9!
==============================================================================
'''.stripIndent())
}
// Specifies the entry point of the application
mainClassName = 'seedu.address.MainApp'
sourceCompatibility = JavaVersion.VERSION_1_9
targetCompatibility = JavaVersion.VERSION_1_9
repositories {
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}
checkstyle {
toolVersion = '8.1'
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination file("${buildDir}/jacocoHtml")
}
}
test {
useJUnitPlatform()
}
dependencies {
String testFxVersion = '4.0.12-alpha'
String jUnitVersion = '5.1.0'
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'
implementation group: 'com.google.guava', name: 'guava', version: '19.0'
implementation group: 'org.apache.pdfbox', name: 'pdfbox', version: '2.0.14'
testImplementation group: 'junit', name: 'junit', version: '4.12'
testImplementation group: 'org.testfx', name: 'testfx-core', version: testFxVersion, {
exclude group: 'org.testfx', module: 'testfx-internal-java8'
}
testImplementation group: 'org.testfx', name: 'testfx-junit', version: testFxVersion
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: jUnitVersion
testRuntimeOnly group: 'org.testfx', name: 'testfx-internal-java9', version: testFxVersion
testRuntimeOnly group: 'org.testfx', name: 'openjfx-monocle', version: 'jdk-9+181'
testRuntimeOnly group:'org.junit.vintage', name:'junit-vintage-engine', version: jUnitVersion
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: jUnitVersion
}
shadowJar {
archiveName = 'pdfplusplus.jar'
destinationDir = file("${buildDir}/jar/")
}
task wrapper(type: Wrapper) {
gradleVersion = '4.8.1'
}
task coverage(type: JacocoReport) {
sourceDirectories = files(sourceSets.main.allSource.srcDirs)
classDirectories = files(sourceSets.main.output)
executionData = files(jacocoTestReport.executionData)
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it, exclude: ['**/*.jar'])
})
}
reports {
html.enabled = true
xml.enabled = true
}
}
coveralls {
sourceDirs = sourceSets.main.allSource.srcDirs.absolutePath
jacocoReportPath = "${buildDir}/reports/jacoco/coverage/coverage.xml"
}
tasks.coveralls {
dependsOn coverage
onlyIf { System.env.'CI' }
}
task(guiTests)
task(nonGuiTests)
// Run `test` task if `guiTests` or `nonGuiTests` is specified
guiTests.dependsOn test
nonGuiTests.dependsOn test
task(allTests)
// `allTests` implies both `guiTests` and `nonGuiTests`
allTests.dependsOn guiTests
allTests.dependsOn nonGuiTests
test {
systemProperty 'testfx.setup.timeout', '60000'
testLogging {
events TestLogEvent.FAILED, TestLogEvent.SKIPPED
// Prints the currently running test's name in the CI's build log,
// so that we can check if tests are being silently skipped or
// stalling the build.
if (System.env.'CI') {
events << TestLogEvent.STARTED
}
}
jacoco {
destinationFile = new File("${buildDir}/jacoco/test.exec")
}
doFirst {
boolean runGuiTests = gradle.taskGraph.hasTask(guiTests)
boolean runNonGuiTests = gradle.taskGraph.hasTask(nonGuiTests)
if (!runGuiTests && !runNonGuiTests) {
runGuiTests = true
runNonGuiTests = true
}
if (runNonGuiTests) {
//Initially Included
test.exclude 'seedu/address/**'
}
if (runGuiTests) {
//Initially Included
test.exclude 'systemtests/**'
test.exclude 'seedu/address/ui/**'
}
if (!runGuiTests) {
test.exclude 'seedu/address/ui/**'
}
}
}
task headless {
doLast {
println 'Setting headless mode properties.'
test {
systemProperties = [
'testfx.robot': 'glass',
'testfx.headless': 'true',
'prism.order': 'sw',
'prism.text': 't2k',
]
}
}
}
// Makes sure that headless properties are set before running tests
test.mustRunAfter headless
asciidoctor {
backends 'html5'
sourceDir 'docs'
outputDir "${buildDir}/docs"
options['template_dirs'].each {
inputs.files fileTree(it)
}
}
// Copies stylesheets into the directory containing generated HTML files as
// Asciidoctor does not copy linked CSS files to the output directory when rendering.
// This is needed for linked stylesheets and embedded stylesheets which import other files.
task copyStylesheets(type: Copy) {
from "${asciidoctor.sourceDir}/stylesheets"
into "${asciidoctor.outputDir}/html5/stylesheets"
}
asciidoctor.dependsOn copyStylesheets
task deployOfflineDocs(type: Copy) {
into('src/main/resources/docs')
from ("${asciidoctor.outputDir}/html5") {
include 'stylesheets/*'
include 'images/*'
include 'HelpWindow.html'
}
}
deployOfflineDocs.dependsOn asciidoctor
processResources.dependsOn deployOfflineDocs
defaultTasks 'clean', 'headless', 'allTests', 'coverage', 'asciidoctor'
I've resolved the issue. For anyone who finds this problem in the future, this was the solution that worked for me. (Tested on Windows & MacOS)
For MacOs: http://www.sajeconsultants.com/how-to-set-java_home-on-mac-os-x/
NOTE: The location /Library/Java/Home
may NOT be the location of your jdk installation, for instance in my machine the location was /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/
ALSO NOTE: For some reason, or perhaps a typo error on my part initially, the solution only worked when I inserted a /
after Home
as shown in the location of my jdk installation above.
ALSO ALSO NOTE: Do not forget to type source ~/.profile
once you are done, then follow the websites directions in performing the checks to ensure that you have set the JAVA_HOME variable correctly.
For Windows OS: https://javatutorial.net/set-java-home-windows-10 (No issues with the steps here).
Thanks for the assistance.
The task flags that all javafx packages do not exist. We are unable to build the fat Jar file.
For example:
error: package javafx.fxml does not exist