This repository has been archived by the owner on Apr 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
103 lines (79 loc) · 3.45 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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
// Apply the java plugin to add support for Java
id 'java'
// Add the servlet plugin
id 'war'
id 'org.gretty' version '3.0.1'
// Apply the application plugin to add support for building an application
id 'application'
}
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
mavenCentral()
maven{
url "http://repository.ops4j.org/maven2/"
}
}
dependencies {
// This dependency is found on compile classpath of this component and consumers.
implementation 'com.google.guava:guava:27.0.1-jre'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:2.7.19'
// Web testing
testCompile 'io.github.bonigarcia:webdrivermanager:1.6.1'
testCompile 'org.seleniumhq.selenium:selenium-java:3.3.1'
// Servlets
providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
// H2
compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
compile group: 'com.h2database', name: 'h2', version: '1.4.199'
// // https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-jasper
// compile group: 'org.apache.tomcat', name: 'tomcat-jasper', version: '10.0.0-M1'
// // https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api
// providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1'
// // https://mvnrepository.com/artifact/org.glassfish.web/javax.servlet.jsp
// compile group: 'org.glassfish.web', name: 'javax.servlet.jsp', version: '2.3.4'
// // https://mvnrepository.com/artifact/javax.servlet.jsp/javax.servlet.jsp-api
// providedCompile group: 'javax.servlet.jsp', name: 'javax.servlet.jsp-api', version: '2.3.3'
}
// Define the main class for the application
mainClassName = 'io.github.frc5024.parts.App'
// Fancy tests output
tasks.withType(Test) {
testLogging {
// set options for log level LIFECYCLE
events TestLogEvent.FAILED,
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_OUT
exceptionFormat TestExceptionFormat.FULL
showExceptions true
showCauses true
showStackTraces true
// set options for log level DEBUG and INFO
debug {
events TestLogEvent.STARTED,
TestLogEvent.FAILED,
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_ERROR,
TestLogEvent.STANDARD_OUT
exceptionFormat TestExceptionFormat.FULL
}
info.events = debug.events
info.exceptionFormat = debug.exceptionFormat
afterSuite { desc, result ->
if (!desc.parent) { // will match the outermost suite
def output = "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} passed, ${result.failedTestCount} failed, ${result.skippedTestCount} skipped)"
def startItem = '| ', endItem = ' |'
def repeatLength = startItem.length() + output.length() + endItem.length()
println('\n' + ('-' * repeatLength) + '\n' + startItem + output + endItem + '\n' + ('-' * repeatLength))
}
}
}
}