Justin
03/27/2023, 6:53 AMCaused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find :kotlin-native-prebuilt-linux-aarch64:1.8.0.
Searched in the following locations:
- <https://download.jetbrains.com/kotlin/native/builds/releases/1.8.0/linux-aarch64/kotlin-native-prebuilt-linux-aarch64-1.8.0.tar.gz>
I test it with a basic hallo world native application.
Changed the build.gradle.kts
to support my M1:
...
kotlin {
val hostOs = System.getProperty("os.name")
val arch = System.getProperty("os.arch")
val isMingwX64 = hostOs.startsWith("Windows")
val nativeTarget = when {
hostOs == "Mac OS X" && arch == "aarch64" -> macosArm64("native")
hostOs == "Mac OS X" -> macosX64("native")
hostOs == "Linux" && arch == "aarch64" -> linuxArm64("native")
hostOs == "Linux" -> linuxX64("native")
isMingwX64 -> mingwX64("native")
else -> throw GradleException("Host OS is not supported in Kotlin/Native.")
}
Dockerfile
FROM gradle:8-jdk17-focal AS builder
COPY . /app
WORKDIR /app
RUN gradle build --warning-mode summary --stacktrace --scan
FROM ubuntu:focal
COPY --from=builder /app/build/bin/native/releaseExecutable ./
CMD ["./clean-native.kexe"]
It looks like the on the latest release linux-aarch64 does not exist.
Is this possible and how could I do this?