Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kotlin Multiplatform build times #125

Closed
JavierSegoviaCordoba opened this issue Nov 30, 2021 · 4 comments
Closed

Kotlin Multiplatform build times #125

JavierSegoviaCordoba opened this issue Nov 30, 2021 · 4 comments

Comments

@JavierSegoviaCordoba
Copy link

I think there are some elements uncached in Kotlin Multiplatform because the build time on a very simple project is being very high.

This is the project: https://github.com/JavierSegoviaCordoba/semantic-versioning-kmp
Build time is over 20 minutes to compile: https://github.com/JavierSegoviaCordoba/semantic-versioning-kmp/actions/runs/1520669770

Not sure if the action is adding konan directory to the cache directories or something so.

@bigdaz
Copy link
Member

bigdaz commented Dec 2, 2021

Thanks for the report. Can you please try running the build with cache-debugging enabled? That will give an overview of what's in the Gradle User Home for this build.

@JavierSegoviaCordoba
Copy link
Author

@JavierSegoviaCordoba
Copy link
Author

.konan is not inside .gradle, it is in the root directory. There are more dependencies, native ones are inside .konan, but javascript libraries were in another place (I don't remember the folder name).

Not sure if caching that directory is the responsibility of Gradle action or not, but should be great the action supports adding custom directories to the Gradle cache so related things were cached like native dependencies or pip dependencies used by Gradle plugins (Kotlin multiplatform or docs Gradle plugins for example).

@bigdaz
Copy link
Member

bigdaz commented Dec 21, 2021

Thanks for the clarification. I think at this stage it's out of scope for gradle-build-action to cache arbitrary state located outside of the Gradle User Home directory.
To enable caching for the .konan directory you can either:

  • Use actions/cache to configure this caching separately
  • Specify the KONAN_DATA_DIR environment variable to ensure that the .konan directory is located inside ~/.gradle/caches.

Perhaps it would make sense for the kotlin-multiplatform Gradle plugin to place the KONAN_DATA_DIR within Gradle User Home.

@bigdaz bigdaz closed this as completed Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants