-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
104 lines (83 loc) · 2.84 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
103
104
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Groovy project to get you started.
* For more details take a look at the Groovy Quickstart chapter in the Gradle
* User Manual available at https://docs.gradle.org/5.3/userguide/tutorial_groovy_projects.html
*/
plugins {
// Apply the groovy plugin to add support for Groovy
id 'groovy'
// Apply the application plugin to add support for building an application
id 'application'
// webdriver binaries
id "com.github.erdi.webdriver-binaries" version "2.2"
id "com.github.ben-manes.versions" version "0.29.0"
}
ext {
// The drivers we want to use
drivers = ["chrome"]
ext {
chromeDriverVersion = '85.0.4183.38'
}
}
webdriverBinaries {
chromedriver {
version = chromeDriverVersion
fallbackTo32Bit = true
}
}
drivers.each { driver ->
task "${driver}Test"(type: Test) {
group JavaBasePlugin.VERIFICATION_GROUP
outputs.upToDateWhen { false } // Always run tests
//systemProperty "geb.build.reportsDir", reporting.file("geb/$name")
systemProperty "geb.env", driver
}
}
test {
dependsOn drivers.collect { tasks["${it}Test"] }
enabled = false
}
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
dependencies {
// Use the latest Groovy version for building this library
implementation 'org.codehaus.groovy:groovy-all:2.5.13'
// Use the awesome Spock testing and specification framework
testCompile 'org.spockframework:spock-core:1.3-groovy-2.5'
testCompile ("com.athaydes:spock-reports:1.7.1") { transitive = false }
// recommended for logging
testCompile 'org.slf4j:slf4j-api:1.7.30'
testCompile 'org.slf4j:slf4j-simple:1.7.30'
// for Geb
compile "org.gebish:geb-spock:3.4"
compile "org.seleniumhq.selenium:selenium-chrome-driver:3.14.0"
//compile "org.seleniumhq.selenium:selenium-firefox-driver:3.14.0"
compile "org.seleniumhq.selenium:selenium-support:3.14.0"
// for Geb-Spock-Reports
// https://github.com/AOEpeople/geb-spock-reports
testCompile 'com.aoe:geb-spock-reports:0.2.6'
}
//configure docToolchain to use the main project's config
project('docToolchain') {
if (project.hasProperty('docDir')) {
docDir = '../.'
mainConfigFile = 'config/docToolchain.groovy'
} else {
println "="*80
println " please initialize the docToolchain submodule"
println " by executing git submodule update -i"
println "="*80
}
}
test {
// let's you start gradle with an option:
// gradle -Dtest.ignoreFailures=true test
ignoreFailures Boolean.getBoolean("test.ignoreFailures")
}
// Define the main class for the application
mainClassName = 'demo.App'