-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
108 lines (95 loc) · 3.51 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
105
106
107
108
plugins {
id 'java'
id 'checkstyle'
id "io.qameta.allure" version "2.8.1"
id 'com.adarshr.test-logger' version '2.0.0'
}
group 'org.openset'
version '1.0-SNAPSHOT'
compileJava {
sourceCompatibility = 11
targetCompatibility = 11
options.compilerArgs += '-parameters'
}
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
allure {
autoconfigure = true
version = '2.7.0'
downloadLink = 'https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.7.0/allure-2.7.0.zip'
useJUnit5 {
version = '2.13.3'
}
}
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
implementation group: 'com.sikulix', name: 'sikulixapi', version: '2.0.4'
implementation group: 'io.appium', name: 'java-client', version: '7.3.0'
implementation group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '4.2.0'
implementation group: 'io.qameta.allure', name: 'allure-junit5', version: '2.13.3'
implementation group: 'org.awaitility', name: 'awaitility', version: '4.0.3'
implementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.6.2'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.13.3'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.13.3'
}
test {
useJUnitPlatform()
maxHeapSize = '1G'
int cores = Integer.valueOf(System.getProperty("cores", String.valueOf(Runtime.runtime.availableProcessors().intdiv(2) ?: 1)))
systemProperties = [
'junit.jupiter.execution.parallel.enabled' : true,
'junit.jupiter.execution.parallel.mode.default' : 'same_thread',
'junit.jupiter.execution.parallel.mode.classes.default' : 'concurrent',
'junit.jupiter.execution.parallel.config.strategy' : 'fixed',
'junit.jupiter.execution.parallel.config.fixed.parallelism': cores,
'config' : System.getProperty("config")
]
// Settings for test-logger gradle plugin.
// See: https://github.com/radarsh/gradle-test-logger-plugin
testlogger {
theme 'standard-parallel'
showExceptions true
showStackTraces true
showFullStackTraces false
showCauses true
slowThreshold 2000
showSummary true
showSimpleNames false
showPassed true
showSkipped true
showFailed true
showStandardStreams false
showPassedStandardStreams true
showSkippedStandardStreams true
showFailedStandardStreams true
}
testLogging {
//noinspection GrUnresolvedAccess
events 'PASSED', 'FAILED', 'SKIPPED'
showStandardStreams = false
}
reports {
junitXml.enabled = true
html.enabled = true
}
afterSuite { desc, result ->
if (!desc.parent) {
println "\nTest result: ${result.resultType}"
println "Test summary: ${result.testCount} tests, " +
"${result.successfulTestCount} succeeded, " +
"${result.failedTestCount} failed, " +
"${result.skippedTestCount} skipped"
}
}
}
task uberJar(type: Jar) {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
from sourceSets.main.output
dependsOn configurations.runtimeClasspath
from {
configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) }
}
}