File tree Expand file tree Collapse file tree 3 files changed +16
-5
lines changed
gradle/build-logic/src/main/kotlin/plugins Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 4242 os = " linux"
4343 }
4444 platform {
45- architecture = " arm64 "
45+ architecture = " amd64 "
4646 os = " linux"
4747 }
4848 }
Original file line number Diff line number Diff line change 33import com.github.ajalt.mordant.rendering.TextColors
44import com.google.cloud.tools.jib.api.buildplan.ImageFormat
55import com.google.cloud.tools.jib.gradle.extension.nativeimage.JibNativeImageExtension
6+ import common.Platform
67import common.githubRepo
78import common.githubUser
89import org.gradle.internal.os.OperatingSystem
5859 // image = "gcr.io/distroless/base-debian12"
5960 image = " debian:stable-slim"
6061 platforms {
62+ platform {
63+ architecture = " arm64"
64+ os = " linux"
65+ }
6166 platform {
6267 architecture = " amd64"
6368 os = " linux"
@@ -127,12 +132,16 @@ tasks {
127132 onlyIf { OperatingSystem .current().isMacOsX }
128133 }
129134
130- // Use LinuxX64 for container image
131- val linkReleaseExecutableLinuxX64 by getting(KotlinNativeLink ::class )
132135 val prepareJib by
133136 registering(Copy ::class ) {
134- // from(linkReleaseExecutableLinuxArm64)
135- from(linkReleaseExecutableLinuxX64)
137+ // DefaultNativePlatform.getCurrentArchitecture()
138+ val containerReleaseExecutable =
139+ when {
140+ Platform .isAmd64 -> named(" linkReleaseExecutableLinuxX64" )
141+ else -> named(" linkReleaseExecutableLinuxArm64" )
142+ }
143+
144+ from(containerReleaseExecutable)
136145 // Jib native image extension expects the native image to be in "native/nativeCompile"
137146 into(layout.buildDirectory.dir(" native/nativeCompile" ))
138147 rename { appBinName }
Original file line number Diff line number Diff line change @@ -95,6 +95,8 @@ tasks {
9595 remoteLineSuffix = " #L"
9696 }
9797
98+ samples.from(" src/test/kotlin" )
99+
98100 perPackageOption {
99101 matchingRegex = " .*internal.*"
100102 suppress = true
You can’t perform that action at this time.
0 commit comments