-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
75 lines (63 loc) · 1.98 KB
/
build.gradle
File metadata and controls
75 lines (63 loc) · 1.98 KB
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
apply plugin: 'java'
defaultTasks 'clean', 'test'
ext {
selenideVersion = '7.16.0'
junitVersion = '6.0.3'
assertjVersion = '3.27.7'
slf4jVersion = '2.0.17'
}
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 platform("org.junit:junit-bom:$junitVersion")
testImplementation "org.junit.jupiter:junit-jupiter"
testImplementation "org.junit.platform:junit-platform-engine"
testImplementation "org.junit.platform:junit-platform-launcher"
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}
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
}
tasks.register("chrome", Test) {
systemProperties['selenide.browser'] = 'chrome'
}
tasks.register("firefox", Test) {
systemProperties['selenide.browser'] = 'firefox'
}
tasks.register("edge", Test) {
systemProperties['selenide.browser'] = 'edge'
}