@@ -5,8 +5,7 @@ plugins {
5
5
id(" org.jetbrains.kotlin.jvm" ) version kotlinVersion
6
6
id(" org.jetbrains.kotlin.kapt" ) version kotlinVersion
7
7
id(" org.jetbrains.kotlin.plugin.allopen" ) version kotlinVersion
8
- id(" org.jetbrains.kotlin.plugin.jpa" ) version kotlinVersion
9
- id(" io.micronaut.application" ) version " 3.7.10"
8
+ id(" io.micronaut.application" ) version " 4.1.0"
10
9
id(" com.diffplug.spotless" ) version " 6.19.0"
11
10
id(" io.gitlab.arturbosch.detekt" ) version " 1.23.1"
12
11
id(" com.github.spotbugs" ) version " 5.1.3"
@@ -22,12 +21,14 @@ group = "recce.server"
22
21
// the Gradle DSL properly. Here we pick one of the versions where multiple artifacts are released at the same time
23
22
// and use this to bump the others consistently.
24
23
val depDescriptors = mapOf (
25
- " micronaut" to " io.micronaut:micronaut-core:4.0.2" ,
24
+ " micronautPlatform" to " io.micronaut.platform:micronaut-platform:4.1.1" ,
25
+ " micronautCore" to " io.micronaut:micronaut-core-bom:4.1.5" ,
26
26
" restAssured" to " io.rest-assured:rest-assured:4.5.1"
27
27
)
28
28
val depVersions = depDescriptors.mapValues { (_, v) -> v.split(' :' ).last() } + mapOf (
29
29
" javaMajor" to " 17" ,
30
- " reactorToolsVersionExpected" to " 3.5.10"
30
+ " kotlin" to " 1.9.0" ,
31
+ " reactorToolsExpected" to " 3.5.10"
31
32
)
32
33
33
34
repositories {
@@ -42,10 +43,15 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach
42
43
kotlinOptions {
43
44
allWarningsAsErrors = true
44
45
}
46
+ compilerOptions {
47
+ jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget .JVM_17 )
48
+ }
45
49
}
46
50
47
51
micronaut {
48
- version(depVersions[" micronaut" ])
52
+ version(depVersions[" micronautPlatform" ])
53
+ coreVersion.set(depVersions[" micronautCore" ])
54
+
49
55
runtime(" netty" )
50
56
testRuntime(" junit5" )
51
57
processing {
@@ -77,15 +83,27 @@ configurations.all {
77
83
}
78
84
79
85
dependencies {
80
- kapt(" io.micronaut:micronaut-http-validation" )
81
86
kapt(" io.micronaut.data:micronaut-data-processor" )
82
- implementation(" io.micronaut:micronaut-runtime" )
83
- implementation(" io.micronaut:micronaut-validation" )
87
+ kapt(" io.micronaut:micronaut-http-validation" )
88
+ kapt(" io.micronaut.serde:micronaut-serde-processor" )
89
+
90
+ implementation(" io.micronaut.serde:micronaut-serde-jackson" )
91
+ implementation(" jakarta.validation:jakarta.validation-api" )
92
+ implementation(" org.jetbrains.kotlin:kotlin-reflect:${depVersions[" kotlin" ]} " )
93
+ implementation(" org.jetbrains.kotlin:kotlin-stdlib-jdk8:${depVersions[" kotlin" ]} " )
94
+ implementation(" io.micronaut.serde:micronaut-serde-jackson" )
95
+ runtimeOnly(" org.yaml:snakeyaml" )
96
+
97
+ kapt(" io.micronaut.validation:micronaut-validation-processor" )
98
+ implementation(" io.micronaut.validation:micronaut-validation" )
99
+ implementation(" jakarta.validation:jakarta.validation-api" )
100
+
84
101
implementation(" io.micronaut.kotlin:micronaut-kotlin-runtime" )
85
102
implementation(" io.micronaut.security:micronaut-security-jwt" )
86
- implementation(" javax .annotation:javax .annotation-api" )
103
+ implementation(" jakarta .annotation:jakarta .annotation-api" )
87
104
implementation(" com.google.guava:guava:32.1.2-jre" ) {
88
105
// see https://github.com/google/guava/pull/6606
106
+ exclude(module = " listenablefuture" )
89
107
exclude(module = " error_prone_annotations" )
90
108
exclude(module = " checker-qual" )
91
109
exclude(module = " jsr305" )
@@ -277,7 +295,7 @@ jib {
277
295
ports = listOf (" 8080" )
278
296
environment = mapOf (" version" to version.toString())
279
297
labels.set(mapOf (" org.opencontainers.image.source" to " https://github.com/$githubRepoOwner /recce" ))
280
- jvmFlags = listOf (" -javaagent:/app/libs/reactor-tools-${depVersions[" reactorToolsVersionExpected " ]} .jar" )
298
+ jvmFlags = listOf (" -javaagent:/app/libs/reactor-tools-${depVersions[" reactorToolsExpected " ]} .jar" )
281
299
}
282
300
}
283
301
@@ -286,10 +304,10 @@ val checkJibDependencies = tasks.register("checkJibDependencies") {
286
304
val resolvedReactorToolsVersion =
287
305
project.configurations.runtimeClasspath.get()
288
306
.resolvedConfiguration.resolvedArtifacts.find { it.name == " reactor-tools" }?.moduleVersion?.id?.version
289
- if (depVersions[" reactorToolsVersionExpected " ] != resolvedReactorToolsVersion) {
307
+ if (depVersions[" reactorToolsExpected " ] != resolvedReactorToolsVersion) {
290
308
throw GradleException (
291
- " Jib docker build expected reactor-tools [${depVersions[" reactorToolsVersionExpected " ]} ] but found " +
292
- " [$resolvedReactorToolsVersion ] in dependencies. Update reactorToolsVersionExpected !"
309
+ " Jib docker build expected reactor-tools [${depVersions[" reactorToolsExpected " ]} ] but found " +
310
+ " [$resolvedReactorToolsVersion ] in dependencies. Update reactorToolsExpected !"
293
311
)
294
312
}
295
313
}
0 commit comments