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

Commit

Permalink
Merge 7dc9331 into 5509159
Browse files Browse the repository at this point in the history
  • Loading branch information
fzdy1914 committed Feb 28, 2019
2 parents 5509159 + 7dc9331 commit 065fa58
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
35 changes: 24 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
// 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'
}
Expand Down Expand Up @@ -41,10 +42,26 @@ test {
useJUnitPlatform()
}

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

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}"

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 +82,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
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

0 comments on commit 065fa58

Please sign in to comment.