-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
191 lines (159 loc) · 6.96 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
plugins {
id 'org.springframework.boot' version '2.7.18'
id 'io.spring.dependency-management' version '1.1.4'
id 'java'
// TODO: Review the following plugins
id 'com.github.johnrengelman.processes' version "0.5.0"
id 'org.springdoc.openapi-gradle-plugin' version "1.8.0"
id 'org.asciidoctor.jvm.convert' version '2.4.0'
id "io.gatling.gradle" version "3.10.5"
}
group = 'com.liatrio'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
contractTestImplementation.extendsFrom(testImplementation)
contractTestRuntimeOnly.extendsFrom(testRuntimeOnly)
// asciidoctorExt
}
sourceSets {
gatling {
java.srcDirs = ["src/performanceTest/java"]
resources.srcDirs = ["src/performanceTest/resources"]
}
contractTest {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
java {
}
}
functionalTest {
java {
java.srcDirs=["src/functionalTest/java"]
}
}
}
allprojects {
tasks.withType(Test).tap {
configureEach {
testLogging {
exceptionFormat "full"
showCauses true
showExceptions true
showStackTraces true
showStandardStreams true
events = ["passed", "skipped", "failed"]
}
}
}
}
repositories {
mavenCentral()
}
ext {
set('snippetsDir', file("build/generated-snippets"))
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web:2.7.18'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa:2.7.18'
implementation 'org.springframework.boot:spring-boot-starter-actuator:2.7.18'
implementation 'org.springframework.boot:spring-boot-starter-security:2.7.18'
implementation 'org.springframework.security:spring-security-config:5.8.11'
implementation 'org.springframework.security:spring-security-web:5.8.11'
implementation 'org.springframework.security:spring-security-core:5.8.11'
implementation 'org.springframework.data:spring-data-rest-core:3.7.18'
implementation 'net.logstash.logback:logstash-logback-encoder:7.3'
// implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' // TODO: use instead of springdoc-openapi-ui once this project is updated to Spring Boot 3.x
implementation 'org.springdoc:springdoc-openapi-ui:1.8.0'
// TODO: Seem to be unused - in the process of reviewing
// implementation 'jakarta.persistence:jakarta.persistence-api:2.2.3'
// implementation 'org.apache.tomcat.embed:tomcat-embed-core:9.0.86'
// implementation 'org.springframework.boot:spring-boot-autoconfigure:2.7.18'
// implementation 'org.springframework.boot:spring-boot:2.7.18'
// implementation 'org.springframework.data:spring-data-commons:2.7.18'
// implementation 'org.springframework.data:spring-data-jpa:2.7.18'
// implementation 'org.springframework.boot:spring-boot-starter-data-rest:2.7.18'
// implementation 'org.springframework:spring-context:5.3.32'
// implementation 'org.springframework:spring-web:6.0.17'
runtimeOnly 'com.h2database:h2:2.2.224'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.7.18'
testImplementation 'org.springframework.boot:spring-boot-starter-security:2.7.18'
testImplementation 'org.springframework.security:spring-security-test:5.8.11'
testImplementation 'org.springframework.security:spring-security-config:5.8.11'
testImplementation 'org.springframework.security:spring-security-web:5.8.11'
testImplementation 'org.mockito:mockito-core:4.11.0'
// Seem to be unused
// testImplementation 'org.springframework.boot:spring-boot-starter-web:2.7.18'
// testImplementation 'com.vaadin.external.google:android-json:0.0.20131108.vaadin1'
// testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
// testImplementation 'org.springframework.boot:spring-boot-test-autoconfigure:2.7.18'
// testImplementation 'org.springframework.boot:spring-boot-test:2.7.18'
// testImplementation 'org.springframework:spring-beans:5.3.32'
// testImplementation 'org.springframework:spring-test:5.3.32'
// testImplementation('org.springframework.boot:spring-boot-starter-test') {
// }
// testImplementation 'org.springframework.security:spring-security-test'
// testImplementation 'org.springframework:spring-webmvc:5.3.32'
// implementation 'com.fasterxml.jackson.core:jackson-databind:2.16.2'
contractTestImplementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.23'
contractTestImplementation 'au.com.dius.pact.provider:junit5:4.6.8'
functionalTestImplementation 'org.springframework.boot:spring-boot-starter-test:2.7.18'
functionalTestImplementation 'org.springframework.security:spring-security-test:5.8.11'
functionalTestImplementation 'io.rest-assured:spring-mock-mvc:4.5.1'
functionalTestImplementation 'com.fasterxml.jackson.core:jackson-databind:2.17.0'
// Seem to be unused
// functionalTestImplementation 'org.junit.platform:junit-platform-suite-api:1.10.2'
// functionalTestImplementation 'com.google.code.gson:gson:2.10.1'
// functionalTestImplementation 'org.apache.johnzon:johnzon-core:1.2.21'
// asciidoctorExt 'org.asciidoctor:asciidoctorj:2.5.11'
zinc 'org.scala-sbt:zinc_2.12:1.9.6'
}
springBoot {
mainClass = 'com.liatrio.dojo.devopsknowledgeshareapi.Application'
}
bootJar {
archiveFileName = 'devops-knowledge-share-api.jar'
}
test {
outputs.dir snippetsDir
useJUnitPlatform()
}
task contractTest(type: Test) {
description = "Run contract tests"
group = "verification"
testClassesDirs = sourceSets.contractTest.output.classesDirs
classpath = sourceSets.contractTest.runtimeClasspath
useJUnitPlatform()
systemProperty "spring.profiles.active", "local"
systemProperty "pact.provider.version", System.env.PACT_PROVIDER_VERSION ?: "0.0.0"
systemProperty 'pactbroker.host', System.env.PACT_BROKER_URL ?: "localhost"
systemProperty 'pactbroker.port', System.env.PACT_BROKER_PORT ?: "9292"
systemProperty 'pactbroker.scheme', System.env.PACT_BROKER_SCHEME ?: 'http'
systemProperty 'pactbroker.auth.username', System.env.PACT_BROKER_USERNAME ?: ""
systemProperty 'pactbroker.auth.password', System.env.PACT_BROKER_PASSWORD ?: ""
systemProperty 'pact.verifier.publishResults', true
}
task functionalTest(type: Test) {
description = "Run functional tests"
group = "verification"
testClassesDirs = sourceSets.functionalTest.output.classesDirs
classpath = sourceSets.functionalTest.runtimeClasspath
useJUnitPlatform()
systemProperties = System.properties
testLogging {
exceptionFormat = 'full'
events = ["passed", "failed", "skipped"]
showStandardStreams = true
}
}
//asciidoctor {
// configurations 'asciidoctorExt'
// inputs.dir snippetsDir
// dependsOn test
//}