Can anyone help me to cache `./konan` folder as th...
# multiplatform
a
Can anyone help me to cache
./konan
folder as the information from this: https://kotlinlang.org/docs/native-improving-compilation-time.html#general-recommendations. It takes long time for me to build the shared-code, it is about 18 minutes, looks like it creates
./konan
folder everytime
j
Are you having an issue locally or on like a CI system?
👀 1
a
Both of them
j
I do something like this and it caches the compiler in my CI builder and never re-downloads it:
Copy code
FROM alpine:3.14 as download-compiler

# Make sure this version matches the version below
ARG VERSION=1.7.0

RUN wget <https://download.jetbrains.com/kotlin/native/builds/releases/>"${VERSION}"/linux-x86_64/kotlin-native-prebuilt-linux-x86_64-"${VERSION}".tar.gz -nv \
    && tar -xvf "kotlin-native-prebuilt-linux-x86_64-${VERSION}.tar.gz"

FROM alpine:3.14

# Make sure this version matches the version above
ARG VERSION=1.7.0

COPY --from=download-compiler kotlin-native-prebuilt-linux-x86_64-"${VERSION}" /root/.konan/kotlin-native-prebuilt-linux-x86_64-"${VERSION}"/
Are you using gradle for your mpp build? I'm surprised you're seeing this locally