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 42
42
os = " linux"
43
43
}
44
44
platform {
45
- architecture = " arm64 "
45
+ architecture = " amd64 "
46
46
os = " linux"
47
47
}
48
48
}
Original file line number Diff line number Diff line change 3
3
import com.github.ajalt.mordant.rendering.TextColors
4
4
import com.google.cloud.tools.jib.api.buildplan.ImageFormat
5
5
import com.google.cloud.tools.jib.gradle.extension.nativeimage.JibNativeImageExtension
6
+ import common.Platform
6
7
import common.githubRepo
7
8
import common.githubUser
8
9
import org.gradle.internal.os.OperatingSystem
58
59
// image = "gcr.io/distroless/base-debian12"
59
60
image = " debian:stable-slim"
60
61
platforms {
62
+ platform {
63
+ architecture = " arm64"
64
+ os = " linux"
65
+ }
61
66
platform {
62
67
architecture = " amd64"
63
68
os = " linux"
@@ -127,12 +132,16 @@ tasks {
127
132
onlyIf { OperatingSystem .current().isMacOsX }
128
133
}
129
134
130
- // Use LinuxX64 for container image
131
- val linkReleaseExecutableLinuxX64 by getting(KotlinNativeLink ::class )
132
135
val prepareJib by
133
136
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)
136
145
// Jib native image extension expects the native image to be in "native/nativeCompile"
137
146
into(layout.buildDirectory.dir(" native/nativeCompile" ))
138
147
rename { appBinName }
Original file line number Diff line number Diff line change @@ -95,6 +95,8 @@ tasks {
95
95
remoteLineSuffix = " #L"
96
96
}
97
97
98
+ samples.from(" src/test/kotlin" )
99
+
98
100
perPackageOption {
99
101
matchingRegex = " .*internal.*"
100
102
suppress = true
You can’t perform that action at this time.
0 commit comments