I’ve got a pretty basic Multiplatform project setu...
# multiplatform
b
I’ve got a pretty basic Multiplatform project setup for an android and ios app. When I assemble, I get several of these messages in the build output:
Copy code
Configuration 'allSourceSetsCompileDependenciesMetadata' was resolved during configuration time.
This is a build performance and scalability issue.
See <https://github.com/gradle/gradle/issues/2298>
The linked gradle issue doesn’t have much detail. My build still works ok. Is there something I can do to resolve this? Is it even something I should worry about? I’m just starting this project so currently it’s small and builds are fast. But it’s not going to remain that way, so seeing “build performance issue” is a bit concerning …
c
It means Gradle is configured to set up the source sets metadata too early (during the configuration phase, which is not parallel nor lazy, hence the scalability issues). I remember seeing this some time ago (~6 months?) but not recently. What are your Gradle and Kotlin plugin versions? Maybe the fix is recent
If you created tasks yourself, ensure they are lazy: use
register
/`registering` instead of
create
/`creating` . https://docs.gradle.org/current/userguide/task_configuration_avoidance.html#task_configuration_avoidance If you don't create tasks yourself, it's possible this is happening inside the Kotlin plugin itself, in which case it will probably be fixed soon
a
b
@CLOVIS I’m using Kotlin 1.8.0, and Gradle Plugin 7.4.1. The project was generated using the “Kotlin Multiplatform App” template in Android Studio. @a-dd thanks for the info. I found that issue earlier, but I noticed the latest comment was from April 2022, and mentioned wanting to fix it in version 1.7. I’m on 1.8.0 so I wasn’t sure if it should still be showing up or not.
a
The fix hasn’t made it to 1.7 and 1.8 unfortunately 😞