-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
89 lines (74 loc) · 2.64 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
plugins {
id 'java'
id 'application'
id 'jacoco'
}
application {
mainClassName = 'winkkari.main.Main'
}
repositories {
mavenCentral()
}
dependencies {
// Spark
implementation "com.sparkjava:spark-core:${sparkVersion}"
// Thymeleaf
implementation "com.sparkjava:spark-template-thymeleaf:${thymeleafVersion}"
// Logging
implementation "org.slf4j:slf4j-api:${slf4jVersion}"
runtimeOnly "org.slf4j:slf4j-simple:${slf4jVersion}"
// JUnit 5
testImplementation "org.junit.jupiter:junit-jupiter-api:${jUnitVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-params:${jUnitVersion}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${jUnitVersion}"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:${jUnitVersion}"
// Mockito
testCompileOnly "org.mockito:mockito-core:${mockitoVersion}"
testImplementation "org.mockito:mockito-junit-jupiter:${mockitoJUnitVersion}"
// Cucumber
testImplementation "io.cucumber:cucumber-java:${cucumberVersion}"
testImplementation "io.cucumber:cucumber-junit:${cucumberVersion}"
// Selenium + Fluentlenium
testImplementation "org.fluentlenium:fluentlenium-core:${fluentleniumVersion}"
testImplementation "org.fluentlenium:fluentlenium-assertj:${fluentleniumVersion}"
testImplementation "org.seleniumhq.selenium:selenium-firefox-driver:${seleniumVersion}"
testImplementation "org.seleniumhq.selenium:selenium-chrome-driver:${seleniumVersion}"
testImplementation "org.seleniumhq.selenium:selenium-api:${seleniumVersion}"
testImplementation "org.seleniumhq.selenium:selenium-java:${seleniumVersion}"
testImplementation "org.seleniumhq.selenium:htmlunit-driver:2.33.0"
// Database
compile group: "com.h2database", name: "h2", version: "1.3.148"
compile group: 'org.postgresql', name: 'postgresql', version: '42.2.8'
// HTML parsing
compile 'org.jsoup:jsoup:1.12.1'
}
task stage {
dependsOn installDist
}
test {
environment "ENV", "test"
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
stackTraceFilters = []
}
jacoco {
// CSS parser has some LONG methods which blow up with JaCoCo. Exclude them. Why the fuck is
// JaCoCo instrumenting transitive dependencies in the first place?
excludes = ["**com/gargoylesoftware/css/*"]
}
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled true
}
}
jar {
manifest {
attributes "Main-Class": "${application.mainClassName}"
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}