-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
124 lines (104 loc) · 4.31 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
plugins {
id 'com.apollographql.apollo' version '2.5.13'
id 'org.springframework.boot' version '2.7.4'
id 'io.spring.dependency-management' version '1.0.14.RELEASE'
id 'de.undercouch.download' version '5.1.2'
id 'java'
id 'jacoco'
id 'io.sentry.jvm.gradle' version '4.3.0'
}
jar {
enabled = false
}
group = 'io.kontur'
version = '0.37.4'
sourceCompatibility = '17'
targetCompatibility = '17'
repositories {
mavenCentral()
}
sentry {
org = System.getenv("SENTRY_ORG")
projectName = "disaster-ninja-be"
authToken = System.getenv("SENTRY_AUTH_TOKEN")
// Generates a JVM (Java, Kotlin, etc.) source bundle and uploads your source code to Sentry.
// This enables source context, allowing you to see your source
// code as part of your stack traces in Sentry.
includeSourceContext = System.getenv("SENTRY_AUTH_TOKEN") ? true : false
}
dependencies {
annotationProcessor 'org.projectlombok:lombok:1.18.24'
compileOnly 'org.projectlombok:lombok:1.18.24'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-aop'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
implementation 'org.wololo:jts2geojson:0.18.1'
implementation('org.locationtech.jts:jts-core:1.19.0')
implementation 'org.locationtech.jts.io:jts-io-common:1.19.0'
implementation 'org.springdoc:springdoc-openapi-ui:1.6.12'
implementation 'com.apollographql.apollo:apollo-runtime:2.5.13'
implementation 'ch.qos.logback.contrib:logback-jackson:0.1.5'
implementation 'ch.qos.logback.contrib:logback-json-classic:0.1.5'
//TODO: upgrade to 'org.apache.httpcomponents.client5:httpclient5' once we upgrade to spring boot 3 / spring 6
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
//health
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'io.micrometer:micrometer-registry-prometheus:1.9.5'
//email
implementation 'org.springframework.boot:spring-boot-starter-mail'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'junit:junit:4.13.2'
implementation group: 'org.mapstruct', name: 'mapstruct', version: '1.5.2.Final'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.5.3.Final'
annotationProcessor 'org.projectlombok:lombok-mapstruct-binding:0.2.0'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'commons-io:commons-io:2.11.0'
testImplementation 'org.hamcrest:hamcrest:2.2'
testImplementation 'uk.co.jemos.podam:podam:7.2.9.RELEASE'
testImplementation 'com.jayway.jsonpath:json-path-assert:2.7.0'
}
tasks.configureEach {
if (name == "generateSentryBundleIdJava") {
mustRunAfter(tasks.generateMainServiceApolloSources)
}
if (name == "sentryCollectSourcesJava") {
mustRunAfter(tasks.generateMainServiceApolloSources)
mustRunAfter(tasks.generateTestServiceApolloSources)
}
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group.startsWith('com.fasterxml.jackson')) {
details.useVersion '2.14.0-rc2'
details.because 'fixes critical vulnerability in lower versions'
}
}
}
test {
useJUnitPlatform()
finalizedBy("jacocoTestReport")
}
apollo {
graphqlSourceDirectorySet.srcDir("src/main/graphql")
graphqlSourceDirectorySet.include("**/*.graphql")
graphqlSourceDirectorySet.exclude("**/schema.graphqls")
}
jacocoTestReport {
reports {
csv.enabled true
csv.destination file("${buildDir}/jacoco.csv")
}
}
task downloadFile(type: Download) {
src 'https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.16.0/opentelemetry-javaagent.jar'
dest "${buildDir}/opentelemetry/opentelemetry-javaagent.jar"
onlyIfModified true
}
task verifyFile(type: Verify, dependsOn: downloadFile) {
dependsOn downloadFile
src new File("${buildDir}/opentelemetry/", 'opentelemetry-javaagent.jar')
algorithm 'MD5'
checksum '4f97ebd74d075e60c76ecdf47b61006a'
}