Gradle: Run ScalaTest tests in addition to the JUnit tests

This commit is contained in:
str4d
2017-12-09 01:43:09 +00:00
parent a67ea4b2f2
commit 4512a940fb
3 changed files with 32 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
apply plugin: 'war'
apply plugin: 'scala'
sourceSets {
main {
@@ -6,6 +7,11 @@ sourceSets {
srcDir 'java/src'
}
}
test {
scala {
srcDir 'java/test/scalatest'
}
}
}
dependencies {
@@ -16,8 +22,18 @@ dependencies {
providedCompile project(':apps:systray')
providedCompile project(':apps:jetty')
providedCompile project(':apps:jrobin')
testCompile "org.scala-lang:scala-library:2.12.4"
testCompile 'org.scalatest:scalatest_2.12:3.0.4'
}
task scalaTest(dependsOn: ['testClasses'], type: JavaExec) {
main = 'org.scalatest.tools.Runner'
args = ['-R', 'build/classes/scala/test', '-o']
classpath = sourceSets.test.runtimeClasspath
}
test.dependsOn scalaTest
jar {
manifest {
// Top level installer will rename to jrobin.jar