-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
102 lines (81 loc) · 2.79 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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'application'
configurations {
resultArchives
}
ext.seleniumVersion = '2.41.0'
dependencies {
compile 'info.cukes:gherkin:2.12.2'
compile 'info.cukes:cucumber-core:1.2.2'
compile 'info.cukes:cucumber-groovy:1.2.2'
// compile group: 'org.seleniumhq.selenium', name: 'selenium-chrome-driver', version: seleniumVersion
compile group: 'org.seleniumhq.selenium', name: 'selenium-api', version: seleniumVersion
compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version: seleniumVersion
groovy localGroovy()
}
repositories {
mavenCentral()
}
group = 'com.yahoo.jonaswu'
version = '1.0'
uploadArchives {
repositories {
mavenDeployer {
repository(url: uri('./jar_repo'))
}
}
}
artifacts {
resultArchives file: file('build/libs/cucumberParallel-1.0.jar')
}
jar {
//from files(sourceSets.main.output.classesDir)
//from configurations.runtime.asFileTree.files.collect { zipTree(it) }
//doFirst {
// from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
//}
exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA'
manifest {
attributes 'Main-Class': 'Main'
}
}
task uberjar(type: Jar, dependsOn: [':compileJava', ':compileGroovy']) {
//from files(sourceSets.main.output.classesDir)
//from configurations.runtime.asFileTree.files.collect { zipTree(it) }
//doFirst {
// from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
//}
exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA'
manifest {
attributes 'Main-Class': 'Main'
}
}
task go(type: JavaExec, dependsOn: [':compileJava', ':compileGroovy']) {
systemProperties 'file.encoding': 'UTF-8'
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
def reportDir = new File('/home/y/var/arya/results/')
if (!reportDir.isDirectory())
reportDir = ''
else
reportDir = '/home/y/var/arya/results/'
main = 'com.yahoo.jonaswu.cucumberparallel.Main'
args = []
args += ['-f', "json:${reportDir}cucumber.json", '-f', "junit:${reportDir}result.xml", '--glue', 'src/test/groovy', '--glue', '../hkdev_qebase/src/main/groovy/globalhook', 'src/test/resources', '--max_instance', '2']
if (project.hasProperty('tags')) {
if (tags) {
ext.tagsSet = tags.split('#')
ext.tagsSet.each() { args += ['--tags', "${it}"] }
}
}
}
test {
//makes the standard streams (err and out) visible at console when running tests
testLogging.showStandardStreams = true
}
test {
onOutput { descriptor, event ->
logger.lifecycle("Test: " + descriptor + " produced standard out/err: " + event.message)
}
}