-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle.backup
68 lines (55 loc) · 2.02 KB
/
build.gradle.backup
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
plugins {
id 'java'
id 'scala'
id "org.scoverage" version "3.0.0"
//id "com.github.maiflai.scalatest" version "0.21"
//id "com.commercehub.cucumber-jvm" version "0.11"
id 'idea'
}
repositories { mavenCentral() }
dependencies {
compile 'org.scala-lang:scala-library:2.12.2'
testCompile 'junit:junit:4.12'
testCompile 'org.scalatest:scalatest_2.12:3.0.1'
testRuntime 'org.pegdown:pegdown:1.4.2'
//testCompile 'org.devzendo:scalacheck-contrib_2.11:1.0.0'
scoverage 'org.scoverage:scalac-scoverage-plugin_2.12:1.3.1', 'org.scoverage:scalac-scoverage-runtime_2.12:1.3.1'
testCompile "org.scalacheck:scalacheck_2.12:1.14.0"
testCompile "io.cucumber:cucumber-scala_2.12:2.0.1"
testCompile "io.cucumber:cucumber-junit:2.4.0" // needed for runner (cucumber.api.junit.Cucumber)
//testCompile "io.cucumber:cucumber-java:2.4.0"
testCompile "org.seleniumhq.selenium:selenium-java:2.35.0"
}
tasks.withType(ScalaCompile) {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
test {
testLogging.showStandardStreams = true
systemProperties System.getProperties()
}
configurations {
cucumberRuntime {
extendsFrom testRuntime
}
}
task cuke(type: JavaExec) {
main = "cucumber.api.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args = ['--plugin', 'pretty', '--glue', '', 'src/test/resources']
}
task props(type: JavaExec) {
main = "org.scalacheck.Test"
classpath = sourceSets.main.output + sourceSets.test.output
args = ['--plugin', 'pretty', '--glue', '', 'src/test/resources']
}
//test.dependsOn cuke // needed if ScalaTest plugin is activated
task scalaTest(dependsOn: ['testClasses'], type: JavaExec) {
main = 'org.scalatest.tools.Runner'
args = ['-R', 'build/classes/test', '-o']
classpath = sourceSets.test.runtimeClasspath
}
test.dependsOn scalaTest
// gradle test --rerun-tasks
// gradle cuke --rerun-tasks
// In IntelliJ, run Cucumber features via RunCucumberTests