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

Commit

Permalink
Merge 85a90e6 into 5509159
Browse files Browse the repository at this point in the history
  • Loading branch information
fzdy1914 committed Feb 28, 2019
2 parents 5509159 + 85a90e6 commit 778cc1d
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 19 deletions.
51 changes: 39 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
// 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
// user guide available at http://gradle.org/docs/5.2.1/userguide/tutorial_java_projects.html

import org.apache.commons.lang.SystemUtils
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 'com.github.johnrengelman.shadow' version '4.0.4'
id 'org.asciidoctor.convert' version '1.5.6'
id 'application'
}

// 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
Expand All @@ -27,6 +28,7 @@ repositories {

checkstyle {
toolVersion = '8.1'
configDir = file("$rootProject.projectDir/config/checkstyle")
}

jacocoTestReport {
Expand All @@ -41,10 +43,39 @@ test {
useJUnitPlatform()
}

def platform
def firstOtherPlatform
def secondOtherPlatform
if (SystemUtils.IS_OS_WINDOWS) {
platform = 'win'
firstOtherPlatform = 'mac'
secondOtherPlatform = 'linux'
} else if (SystemUtils.IS_OS_LINUX) {
platform = 'linux'
firstOtherPlatform = 'mac'
secondOtherPlatform = 'win'
} else if (SystemUtils.IS_OS_MAC) {
platform = 'mac'
firstOtherPlatform = 'win'
secondOtherPlatform = 'linux'
}

dependencies {
String testFxVersion = '4.0.12-alpha'
String jUnitVersion = '5.1.0'

compile "org.openjfx:javafx-base:11:${platform}"
compile "org.openjfx:javafx-controls:11:${platform}"
compile "org.openjfx:javafx-fxml:11:${platform}"
compile "org.openjfx:javafx-graphics:11:${platform}"
compile "org.openjfx:javafx-media:11:${platform}"
compile "org.openjfx:javafx-web:11:${platform}"

compile "org.openjfx:javafx-graphics:11:${firstOtherPlatform}"
compile "org.openjfx:javafx-graphics:11:${secondOtherPlatform}"
compile "org.openjfx:javafx-web:11:${firstOtherPlatform}"
compile "org.openjfx:javafx-web:11:${secondOtherPlatform}"

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 @@ -65,18 +96,14 @@ shadowJar {
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)
getSourceDirectories().from(files(sourceSets.main.allSource.srcDirs))
getClassDirectories().from(files(sourceSets.main.output))
getExecutionData().from(files(jacocoTestReport.executionData))
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
getClassDirectories().from(files(classDirectories.files.collect {
fileTree(dir: it, exclude: ['**/*.jar'])
})
}))
}
reports {
html.enabled = true
Expand Down
5 changes: 1 addition & 4 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,13 @@
</module>

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


<!-- All Java AST specific tests live under TreeWalker module. -->
<module name="TreeWalker">

<!-- Required for SuppressionCommentFilter to work -->
<module name="FileContentsHolder"/>

<!-- Required to allow exceptions in code style -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE.OFF\: ([\w\|]+)"/>
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
10 changes: 10 additions & 0 deletions src/main/java/seedu/address/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package seedu.address;

/**
* The main entry point to the application.
*/
public class Main {
public static void main(String[] args) {
MainApp.initiate(args);
}
}
4 changes: 2 additions & 2 deletions src/main/java/seedu/address/MainApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import seedu.address.ui.UiManager;

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

Expand Down Expand Up @@ -181,7 +181,7 @@ public void stop() {
}
}

public static void main(String[] args) {
public static void initiate(String[] args) {
launch(args);
}
}

0 comments on commit 778cc1d

Please sign in to comment.