-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
130 lines (105 loc) · 3.09 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
buildscript {
repositories {
jcenter()
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'org.gretty:gretty:2.3.1'
classpath "com.avast.gradle:gradle-docker-compose-plugin:0.9.4"
}
}
plugins {
id 'jacoco'
}
plugins {
id 'org.unbroken-dome.test-sets' version '2.1.1'
id "org.sonarqube" version "2.7.1"
}
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'org.gretty'
apply plugin: 'docker-compose'
defaultTasks 'clean', 'build'
dockerCompose {
useComposeFiles = ['docker-compose.yml']
forceRecreate = true
}
sourceCompatibility = 11
targetCompatibility = 11
testSets {
e2e { dirName = 'e2e' }
}
gretty {
servletContainer = 'tomcat9'
contextPath = ""
springBoot = false
integrationTestTask = 'e2e'
}
wrapper {
gradleVersion = '5.2.1'
distributionType = Wrapper.DistributionType.ALL
}
project.afterEvaluate {
tasks.build.dependsOn tasks.e2e
}
task startDependencies {
dependsOn 'composeDown'
dependsOn 'composeUp'
}
task stage
configurations { stage {} }
task copyToLib(type: Copy) {
into "$buildDir/server"
from(configurations.stage) {
include "webapp-runner*"
}
}
tasks.stage.dependsOn(copyToLib)
dependencies {
/* Apache Commons BEGIN */
implementation "org.apache.commons:commons-lang3:3.9"
/* Apache Commons END */
/* JEE dependencies BEGIN */
implementation "javax.servlet:jstl:1.2"
implementation "javax.servlet:javax.servlet-api:4.0.1"
/* JEE dependencies END */
/* Logging BEGIN */
implementation "org.slf4j:slf4j-api:1.7.26"
implementation "org.slf4j:jul-to-slf4j:1.7.26"
implementation "ch.qos.logback:logback-classic:1.2.3"
// For CRLF-attack prevention
implementation "org.owasp:security-logging-logback:1.1.6"
/* Logging END */
/* Database Connectivity BEGIN */
implementation "mysql:mysql-connector-java:8.0.16"
implementation "com.zaxxer:HikariCP:3.3.1"
implementation "org.flywaydb:flyway-core:6.0.0-beta"
/* Database Connectivity END */
/* Password Hashing library BEGIN */
implementation "org.mindrot:jbcrypt:0.4"
/* Password Hashing library END */
/* Unit testing BEGIN */
testImplementation "org.junit.jupiter:junit-jupiter-api:5.4.2"
testImplementation "org.junit.jupiter:junit-jupiter-params:5.4.2"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.4.2"
testImplementation "org.mockito:mockito-junit-jupiter:2.28.2"
testImplementation "org.assertj:assertj-core:3.12.2"
// For Repository tests
testImplementation "com.wix:wix-embedded-mysql:4.2.0"
/* Unit testing END */
/* E2E testing BEGIN */
testImplementation "org.seleniumhq.selenium:selenium-java:3.141.59"
testImplementation "io.github.bonigarcia:webdrivermanager:3.4.0"
testImplementation "org.seleniumhq.selenium:selenium-chrome-driver:3.141.59"
/* E2E testing END */
/* Heroku Gradle buildpack support BEGIN */
stage "com.github.jsimone:webapp-runner:9.0.20.0"
/* Heroku Gradle buildpack support END */
}
repositories {
jcenter()
}
tasks.withType(Test) {
useJUnitPlatform()
}