-
Notifications
You must be signed in to change notification settings - Fork 25
/
build.gradle
92 lines (78 loc) · 2.35 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
buildscript {
repositories {
jcenter()
}
dependencies {
// if you use the version of cucumber-jvm that the plugin was built with
classpath "info.cukes:cucumber-core:1.2.5"
}
}
plugins {
id "groovy"
id "idea"
id "com.github.samueltbrown.cucumber" version "0.9"
id "com.energizedwork.idea-project-components" version "1.4"
id "com.energizedwork.idea-base" version "1.4"
id "com.energizedwork.webdriver-binaries" version "1.4"
}
ext {
gebVersion = '4.1'
seleniumVersion = '3.14.0'
cucumberJvmVersion = '1.2.5'
chromeDriverVersion = '73.0.3683.68'
geckoDriverVersion = '0.24.0'
}
repositories {
mavenCentral()
}
dependencies {
testCompile "org.gebish:geb-core:$gebVersion"
testCompile "org.seleniumhq.selenium:selenium-api:$seleniumVersion"
testCompile "info.cukes:cucumber-core:$cucumberJvmVersion"
testCompile "info.cukes:cucumber-groovy:$cucumberJvmVersion"
// this supplies some pre-built cucumber steps for driving Geb,
// see https://github.com/tomdcc/geb-cucumber
testCompile "io.jdev.geb:geb-cucumber:0.3"
// pick whichever drivers you want. We test against most of them here.
// see src/test/resources/GebConfig.groovy for how to switch between them
testCompile "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion"
testCompile "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion"
}
webdriverBinaries {
chromedriver chromeDriverVersion
geckodriver geckoDriverVersion
}
cucumber {
formats = [
'pretty', // prints nice format out to the console
'html:build/reports/cucumber', // html
'junit:build/cucumber.xml' // junit format for integration with CI tool etc
]
// src/cucumber/resources is included automatically
glueDirs = [
"classpath:io.jdev.geb.cucumber.steps.groovy.en"
]
}
configureChromeDriverBinary {
addBinaryAware { path ->
tasks.cucumber.jvmOptions.systemProperties("webdriver.chrome.driver": path)
}
}
configureGeckoDriverBinary {
addBinaryAware { path ->
tasks.cucumber.jvmOptions.systemProperties("webdriver.gecko.driver": path)
}
}
tasks.cucumber {
dependsOn configureChromeDriverBinary, configureGeckoDriverBinary
jvmOptions.systemProperties([
"geb.cucumber.step.packages": "pages",
"geb.env": System.getProperty("geb.env")
])
}
tasks.withType(GroovyCompile) {
groovyOptions.forkOptions.memoryMaximumSize = '256m'
}
ideaProjectComponents {
file "gradle/idea/ideaCodeStyle.xml"
}