-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
56 lines (44 loc) · 1.64 KB
/
build.gradle
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
apply plugin: 'scala'
repositories {
mavenCentral()
mavenRepo urls: uri('http://scala-tools.org/repo-releases')
}
dependencies {
// Libraries needed to run the scala tools
scalaTools 'org.scala-lang:scala-compiler:2.9.1'
scalaTools 'org.scala-lang:scala-library:2.9.1'
// Libraries needed for scala api
compile 'org.scala-lang:scala-library:2.9.1'
compile 'com.tristanhunt:knockoff_2.9.1:0.8.0-16'
compile 'org.fusesource.scalate:scalate-core:1.5.2'
compile 'com.github.scala-incubator.io:scala-io-core_2.9.1:0.2.0'
compile 'com.github.scala-incubator.io:scala-io-file_2.9.1:0.2.0'
testCompile 'org.scalatest:scalatest_2.9.1:1.6.1'
}
jar {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
manifest { attributes 'Main-Class': 'com.tristanhunt.sourcedown.Sourcedown' }
}
sourceSets.test.runtimeClasspath += files("build/classes/test")
task(runFunctionalTests, dependsOn: [assemble, testClasses], type: JavaExec) {
classpath = sourceSets.test.runtimeClasspath
main = "com.tristanhunt.sourcedown.RunSourcedownTests"
}
runFunctionalTests.description = "Executes the Sourcedown test framework."
/*
Use scalatest for some BDD
*/
task test(overwrite: true, dependsOn: compileTestScala) << {
ant.taskdef(
name: 'scalatest',
classname: 'org.scalatest.tools.ScalaTestAntTask',
classpath: configurations.testRuntime.asPath + ':' + compileScala.destinationDir
)
ant.scalatest(
runpath: "build/classes/test", // sourceSets.test.classesDir,
haltonfailure: 'true',
fork: 'false'
) {
reporter(type: 'stdout')
}
}