I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 4512a940 authored by str4d's avatar str4d
Browse files

Gradle: Run ScalaTest tests in addition to the JUnit tests

parent a67ea4b2
No related branches found
No related tags found
No related merge requests found
apply plugin: 'war'
apply plugin: 'scala'
sourceSets {
main {
......@@ -6,6 +7,11 @@ sourceSets {
srcDir 'java/src'
}
}
test {
scala {
srcDir 'java/test/scalatest'
}
}
}
dependencies {
......@@ -16,7 +22,17 @@ 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 {
......
apply plugin: 'idea'
// Exclude apps/ dir itself, but include its subdirs
def javaProjects = subprojects - project(':apps')
......
apply plugin: 'java-library'
apply plugin: 'scala'
archivesBaseName = 'i2p'
......@@ -30,13 +31,26 @@ sourceSets {
include 'net/i2p/crypto/eddsa/math/baseDblPrecmp'
include 'net/i2p/crypto/eddsa/math/basePrecmp'
}
scala {
srcDir 'java/test/scalatest'
}
}
}
dependencies {
implementation 'gnu.getopt:java-getopt:1.0.13'
implementation 'org.gnu.gettext:libintl:0.18.3'
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
configurations {
tests
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment