Skip to content

Commit

Permalink
Fix and test quarkus image (#12568)
Browse files Browse the repository at this point in the history
  • Loading branch information
trask authored Nov 5, 2024
1 parent 2fc4c77 commit 2717fb4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions smoke-tests/images/quarkus/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ dependencies {
implementation("io.quarkus:quarkus-rest")
}

quarkus {
// Expected by jib extension.
// TODO(anuraaga): Switch to quarkus plugin native jib support.
setFinalName("opentelemetry-quarkus-$version")
}

// Quarkus 3.7+ requires Java 17+
val targetJDK = project.findProperty("targetJDK") ?: "17"

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

java {
// this is needed to avoid jib failing with
// "Your project is using Java 17 but the base image is for Java 8"
// "Your project is using Java 21 but the base image is for Java 17"
// (it seems the jib plugins does not understand toolchains yet)
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

jib {
Expand All @@ -46,6 +40,12 @@ jib {
container {
mainClass = "bogus" // to suppress Jib warning about missing main class
}
pluginExtensions {
pluginExtension {
implementation = "com.google.cloud.tools.jib.gradle.extension.quarkus.JibQuarkusExtension"
properties = mapOf("packageType" to "fast-jar")
}
}
}

tasks {
Expand Down

0 comments on commit 2717fb4

Please sign in to comment.