-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
69 lines (59 loc) · 1.78 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
apply plugin: 'java'
defaultTasks 'clean', 'test'
ext {
selenideVersion = '7.6.1'
junitVersion = '5.11.4'
assertjVersion = '3.27.0'
slf4jVersion = '2.0.16'
}
repositories{
mavenCentral()
mavenLocal()
maven {
url uri('https://oss.sonatype.org/content/repositories/snapshots/')
mavenContent {
snapshotsOnly()
}
}
}
dependencies {
testImplementation "com.codeborne:selenide:$selenideVersion"
testImplementation "com.codeborne:selenide-full-screenshot:$selenideVersion"
testImplementation "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
testImplementation "org.junit.jupiter:junit-jupiter-params:$junitVersion"
testImplementation "org.assertj:assertj-core:$assertjVersion"
testImplementation "org.slf4j:slf4j-api:$slf4jVersion"
testRuntimeOnly "org.slf4j:slf4j-simple:$slf4jVersion"
// Why it's needed?
// It causes the runtime error:
// java.lang.NoSuchMethodError: 'java.lang.String org.apache.commons.io.IOUtils.toString(java.net.URL, java.nio.charset.Charset)'
// implementation 'com.browserstack:browserstack-java-sdk:1.12.4'
}
configurations.configureEach {
resolutionStrategy.cacheChangingModulesFor 30, 'seconds'
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.debug = true
sourceCompatibility = 17
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
systemProperties 'file.encoding': 'UTF-8'
testLogging.showStandardStreams = true
outputs.upToDateWhen {false}
}
tasks.register("chrome", Test) {
systemProperties['selenide.browser'] = 'chrome'
}
tasks.register("firefox", Test) {
systemProperties['selenide.browser'] = 'firefox'
}
tasks.register("edge", Test) {
systemProperties['selenide.browser'] = 'edge'
}