https://kotlinlang.org logo
d

Djuro

08/03/2023, 8:02 AM
Hello everyone! Currently I have an application with 4 KMM modules,
data
,
domain
,
di
and
presentation
. Everything works beautiful. There is only 1 issue. When in Android studio I perform
clean project -> rebuild project
it takes more than 10 minutes to do it. Is this normal? Any ideas on how to optimize this
a

Asghar

08/03/2023, 8:05 AM
Yes, it is normal (For me)
a

Arkadii Ivanov

08/03/2023, 9:59 AM
I think it builds all targets. E.g. for iOS there are usually 3 targets, plus e.g. Android, so 4 in total. I usually manually build just one native target per family.
And only do full builds occasionally, or better on CI.
i

Ivan Fernandez

08/03/2023, 10:02 AM
Yes, totally, but if i want to try something i usually do
assembleDebug
, is faster
👍 1
m

Matt Nelson

08/05/2023, 2:17 AM
I made a plugin specifically for this, so you can control what targets get built via passing of properties e.g.
./gradlew build -PKMP_TARGETS="ANDROID,JVM"
would only build those 2 targets https://github.com/05nelsonm/gradle-kmp-configuration-plugin#target-properties
3 Views