Skip to content

Commit 47c5ea5

Browse files
traskAlex Kats
authored and
Alex Kats
committed
Fix and test quarkus image (open-telemetry#12568)
1 parent 93de4c0 commit 47c5ea5

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

smoke-tests/images/quarkus/build.gradle.kts

+9-9
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ dependencies {
2020
implementation("io.quarkus:quarkus-rest")
2121
}
2222

23-
quarkus {
24-
// Expected by jib extension.
25-
// TODO(anuraaga): Switch to quarkus plugin native jib support.
26-
setFinalName("opentelemetry-quarkus-$version")
27-
}
28-
2923
// Quarkus 3.7+ requires Java 17+
3024
val targetJDK = project.findProperty("targetJDK") ?: "17"
3125

@@ -34,10 +28,10 @@ val tag = findProperty("tag")
3428

3529
java {
3630
// this is needed to avoid jib failing with
37-
// "Your project is using Java 17 but the base image is for Java 8"
31+
// "Your project is using Java 21 but the base image is for Java 17"
3832
// (it seems the jib plugins does not understand toolchains yet)
39-
sourceCompatibility = JavaVersion.VERSION_1_8
40-
targetCompatibility = JavaVersion.VERSION_1_8
33+
sourceCompatibility = JavaVersion.VERSION_17
34+
targetCompatibility = JavaVersion.VERSION_17
4135
}
4236

4337
jib {
@@ -46,6 +40,12 @@ jib {
4640
container {
4741
mainClass = "bogus" // to suppress Jib warning about missing main class
4842
}
43+
pluginExtensions {
44+
pluginExtension {
45+
implementation = "com.google.cloud.tools.jib.gradle.extension.quarkus.JibQuarkusExtension"
46+
properties = mapOf("packageType" to "fast-jar")
47+
}
48+
}
4949
}
5050

5151
tasks {

0 commit comments

Comments
 (0)