@@ -29,7 +29,7 @@ dependencies {
2929
3030 implementation(" jakarta.validation:jakarta.validation-api" )
3131 implementation(" jakarta.ws.rs:jakarta.ws.rs-api" )
32- implementation(libs .bouncycastle)
32+ implementation(" org .bouncycastle:bcpkix-jdk18on " )
3333 implementation(libs.mapstruct.runtime)
3434
3535 runtimeOnly(" io.quarkus:quarkus-jdbc-h2" )
@@ -42,13 +42,13 @@ dependencies {
4242 testImplementation(" org.mockito:mockito-junit-jupiter" )
4343 testImplementation(" io.quarkus:quarkus-junit5-mockito" )
4444 testImplementation(" io.rest-assured:rest-assured" )
45- testImplementation(testLibs .assertj)
46- testImplementation(testLibs .archunit)
45+ testImplementation(libs .assertj)
46+ testImplementation(libs .archunit)
4747}
4848
4949java {
5050 toolchain {
51- languageVersion = JavaLanguageVersion .of(21 )
51+ languageVersion = JavaLanguageVersion .of(25 )
5252 }
5353}
5454
@@ -61,6 +61,11 @@ tasks.withType<JavaCompile>().configureEach {
6161 options.compilerArgs.add(" -parameters" )
6262}
6363
64+ val compileAll by tasks.registering {
65+ description = " Lifecycle Task to compile all source sets"
66+ dependsOn(tasks.withType<JavaCompile >())
67+ }
68+
6469// this file is used in the publish-workflow as well
6570val openApiSpecificationFile = layout.buildDirectory.file(" openapi-specification.json" )
6671
@@ -84,25 +89,28 @@ spotless {
8489 }
8590}
8691
92+ // setting "quarkus.native.enabled" is not enough when using Gradle, you also have to disable jar packaging
93+ // see https://github.com/quarkusio/quarkus/discussions/40679
94+ val buildNativeImage = providers.gradleProperty(" nativeImage" )
95+ .map { it.toBoolean() }
96+ .orElse(false )
97+
8798quarkus {
99+ set(" package.jar.enabled" , buildNativeImage.map { ! it }.map(Boolean ::toString))
100+ set(" native.enabled" , buildNativeImage.map(Boolean ::toString))
88101 set(" native.container-build" , " true" )
89102 set(" container-image.build" , " true" )
90103 set(" container-image.group" , " dnl50" )
91104 set(" container-image.name" , " tsa-server" )
92- set(" container-image.tag" , provider {
93- if (project.hasProperty(" imageTagSuffix" )) {
94- " ${project.version} -${project.property(" imageTagSuffix" )} "
95- } else {
96- project.version.toString()
105+ set(
106+ " container-image.tag" ,
107+ buildNativeImage.map { native ->
108+ " ${project.version}${if (native) " " else " -jvm" } "
97109 }
98- } )
110+ )
99111 finalName.set(" tsa-${project.version} " )
100112}
101113
102- tasks.check {
103- dependsOn(tasks.testNative)
104- }
105-
106114// for some reason quarkus does recognize that the JDBC URL is set in the prod profile. therefore it
107115// creates a h2 db in server mode (using the H2DevServicesProcessor) which runs on the host machine and sets the JDBC URL
108116// to something like "jdbc:h2:tcp://localhost:53233/mem:test" which obviously does not work inside the docker container
0 commit comments