icerockdev / moko-resources

Resources access for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev/
Apache License 2.0
1.08k stars 121 forks source link

Slow build time #686

Open ahmedsalemelzeiny opened 5 months ago

ahmedsalemelzeiny commented 5 months ago

I added moko-resources to my App to help generate the resources but currently, it's affecting our development progress because it takes too much time to get the app building and working.

Before using it the app was building within minutes but currently, it can take up to 40 minutes to build, I'm using a Macbook Pro M1, So I was checking if there is any reason for that and I upgraded the version to us 0.24.0-beta-1 and enabled the following and I can notice some differences in build time like 5 mins less than usual

org.gradle.parallel=true
# Enable Configuration Cache
org.gradle.unsafe.configuration-cache=true

and when I removed the whole library it worked and the app builds within the accepted range, Any way to fix that or reduce the build time?

FYI, my app works as follows I have a library (which includes moko-resources) that does a lot of common functionality and then I published it and I used the published library within my apps (which uses moko-resources as well)

Alex009 commented 5 months ago

Hi. Please create sample where we can reproduce issue.

3llomi commented 4 months ago

same here

CleanShot 2024-05-12 at 16 41 02

Alex009 commented 4 months ago

@3llomi hi. please show timings without moko-resources too. link release tasks always significant slower than debug

3llomi commented 4 months ago

@Alex009 for some reason the release tasks are running even when running a debug build. not sure if it's related to moko though.

[UPDATE]: I don't think it's related to moko-resources as I have removed it and it almost takes the same time.