-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
55 lines (49 loc) · 1.55 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
apply plugin: 'java'
apply plugin: 'eclipse'
sourceCompatibility = 1.8
version = '1.0'
jar {
manifest {
attributes 'Implementation-Title': 'Gradle Quickstart',
'Implementation-Version': version
}
}
repositories {
mavenCentral()
}
dependencies {
compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
compile 'org.seleniumhq.selenium:selenium-java:2.52.+'
compile group: 'io.appium', name: 'java-client', version: '3.4.1'
compile 'org.apache.commons:commons-lang3:3.3.2'
compile 'org.testng:testng:6.9.+' //like added to build path
compile 'javax.mail:mail:1.4.1'
compile 'org.apache.commons:commons-lang3:3.0' //for stringUtils
compile 'ch.qos.logback:logback-classic:1.1.3'
compile 'ch.qos.logback:logback-core:1.1.3'
testCompile group: 'junit', name: 'junit', version: '4.+'
}
task getHomeDir << {
println gradle.gradleHomeDir
}
test {
test {
options {
systemProperties(System.getProperties()) //no need to specify individual property with -D flag
}
String testXml = System.getProperty("test")
testXml = (testXml==null)?"":testXml.toLowerCase()
String testCasePath = 'src/test/resources/test_scripts/testng_'+testXml+'.xml'
println '************ Executing Test ='+testCasePath
useTestNG() {
suites testCasePath
}
}
}
uploadArchives {
repositories {
flatDir {
dirs 'repos'
}
}
}