-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.inactive
86 lines (68 loc) · 2.55 KB
/
build.gradle.inactive
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.11'
id 'java' // Required by at least JUnit.
// Plugin which checks for dependency updates with help/dependencyUpdates task.
id 'com.github.ben-manes.versions' version '0.20.0'
// Plugin which can update Gradle dependencies, use help/useLatestVersions
id 'se.patrikerdes.use-latest-versions' version '0.2.7'
// Test coverage
id 'jacoco'
// Upload jacoco coverage reports to coveralls
id 'com.github.kt3k.coveralls' version '2.8.2'
}
dependencies {
compile 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
compile 'org.slf4j:slf4j-simple:1.8.0-beta2'
// JUnit 5
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.2'
testRuntime 'org.junit.platform:junit-platform-console:1.3.2'
// Kotlintest
testCompile 'io.kotlintest:kotlintest-core:3.1.11'
testCompile 'io.kotlintest:kotlintest-assertions:3.1.11'
testCompile 'io.kotlintest:kotlintest-runner-junit5:3.1.11'
// JavaFX tests using TestFX
testCompile 'org.testfx:testfx-core:4.0.15-alpha'
testCompile 'org.testfx:testfx-junit:4.0.15-alpha'
// Only needed for headless testing.
// testCompile 'org.testfx:openjfx-monocle:8u76-b04' // jdk-9+181 for Java 9
// Spek
testCompile 'org.spekframework.spek2:spek-dsl-jvm:2.0.0-rc.1'
testCompile 'org.spekframework.spek2:spek-runner-junit5:2.0.0-rc.1'
}
repositories {
maven {
url 'https://dl.bintray.com/spekframework/spek-dev'
}
mavenCentral()
mavenLocal()
jcenter()
}
test {
// Enable JUnit 5 (Gradle 4.6+).
useJUnitPlatform()
// Always run tests, even when nothing changed.
dependsOn 'cleanTest'
// Show test results.
testLogging {
events "passed", "skipped", "failed"
}
}
// Test coverage reporting
jacocoTestReport {
// Enable xml for coveralls.
reports {
html.enabled = true
xml.enabled = true
xml.setDestination(file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml" as Object))
}
sourceSets project.sourceSets.main
}
coveralls {
sourceDirs += allprojects.sourceSets.main.allSource.srcDirs.flatten()
sourceDirs += files(sourceSets.main.kotlin.srcDirs).files.absolutePath
project.extensions.coveralls.sourceDirs += project.sourceSets.main.kotlin.srcDirs
sourceDirs += ["${projectDir}/src/main/kotlin"]
jacocoReportPath = "${buildDir}/reports/jacoco/test/jacocoTestReport.xml" as Object
sourceDirs += ["${projectDir}/src/test/kotlin"]
}