-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
158 lines (129 loc) · 5.01 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
plugins {
id 'rpki-ripe-ncc.build-conventions'
id 'org.springframework.boot' version "3.2.4"
id 'distribution'
id 'jacoco'
id "com.google.cloud.tools.jib" version "3.4.4"
id "com.google.osdetector" version "1.7.3"
}
apply plugin: 'java'
apply plugin: 'io.spring.dependency-management'
apply from: "dependencies.gradle"
// Use this style to override dependencies when needed:
// ext['log4j2.version'] = '2.17.1'
def ENV = System.getenv()
def hsmImpl = ENV['HSM_IMPL'] ?: 'api-only'
description = 'RPKI RIPE NCC'
version = ENV['BUILD_NUMBER'] ?: 'DEV'
def managedVersions = dependencyManagement.managedVersions
dependencies {
//developmentOnly 'org.springframework.boot:spring-boot-devtools'
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
implementation 'org.springframework.boot:spring-boot-starter-jersey'
implementation 'org.springframework.boot:spring-boot-starter-mail'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-quartz'
implementation 'org.springframework.boot:spring-boot-starter-security'
// for http client - we do not use reactive patterns in general
implementation 'org.springframework.boot:spring-boot-starter-webflux'
if (osdetector.os == "osx") {
runtimeOnly "io.netty:netty-resolver-dns-native-macos:${managedVersions['io.netty:netty-resolver-dns-native-macos']}:osx-${osdetector.arch}"
}
implementation 'org.flywaydb:flyway-core'
implementation "org.thymeleaf:thymeleaf:3.1.2.RELEASE"
implementation "org.thymeleaf:thymeleaf-spring6:3.1.2.RELEASE"
implementation platform('io.sentry:sentry-bom:7.16.0')
implementation 'io.sentry:sentry-spring-boot-starter'
implementation 'io.sentry:sentry-logback'
implementation "net.ripe.rpki:rpki-commons:$rpki_commons_version"
implementation 'org.springdoc:springdoc-openapi-ui:1.8.0'
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
implementation 'org.postgresql:postgresql:42.7.4'
runtimeOnly 'org.springframework.boot:spring-boot-starter-tomcat'
implementation 'com.google.code.gson:gson:2.11.0'
implementation 'com.jamesmurty.utils:java-xmlbuilder:1.3'
implementation 'commons-codec:commons-codec:1.17.1'
implementation 'commons-io:commons-io:2.17.0'
implementation 'ch.qos.logback.contrib:logback-json-classic:0.1.5'
implementation 'ch.qos.logback.contrib:logback-jackson:0.1.5'
implementation 'net.logstash.logback:logstash-logback-encoder:8.0'
implementation 'commons-lang:commons-lang:2.6'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation('org.junit.vintage:junit-vintage-engine') {
exclude group: 'org.hamcrest', module: 'hamcrest-core'
}
testImplementation "org.wiremock:wiremock-jetty12:3.9.2"
testImplementation 'net.jqwik:jqwik:1.9.1'
testImplementation "net.ripe.rpki:rpki-commons:$rpki_commons_version:tests"
testImplementation 'org.assertj:assertj-core'
implementation (project(':hsm')) {
capabilities {
requireCapability('net.ripe.rpki.hsm:' + hsmImpl)
}
}
}
sourceSets {
integration {
java.srcDir 'src/integration/java'
resources.srcDir 'src/integration/resources'
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
}
}
configurations {
integrationImplementation.extendsFrom testImplementation
integrationRuntime.extendsFrom testRuntime
integrationRuntimeOnly.extendsFrom testRuntimeOnly
}
tasks.withType(Tar) {
compression = Compression.GZIP
}
tasks.withType(Test) {
useJUnitPlatform {
includeEngines 'jqwik', 'junit-jupiter', 'junit-vintage'
}
}
task integrationTest(type: Test) {
description = 'Run system integration tests. Requires network access.';
group = 'verification'
testClassesDirs = sourceSets.integration.output.classesDirs
classpath = sourceSets.integration.runtimeClasspath
mustRunAfter test
}
// run integration tests as part of `check`
tasks.named('check') {
dependsOn tasks.named('integrationTest')
}
bootRun {
systemProperty 'spring.profiles.active', 'local'
}
bootJar {
archiveFileName = "rpki-ripe-ncc.jar"
}
distributions {
main {
contents {
from bootJar.outputs
from 'etc/ssl'
}
}
}
jib {
from {
image = "openjdk:17-jdk-slim"
}
to {
image = "docker-registry.ripe.net/rpki/rpki-ripe-ncc"
}
container {
labels = [
"org.label-schema.vcs-ref": "${-> project.ext.gitProps['git.commit.id.abbrev']}",
"net.ripe.rpki.hsm": "${-> hsmImpl}"
]
}
};