Hi, I‘m having an android  project. and I notice i...
# gradle
j
Hi, I‘m having an android  project. and I notice it try to find some directory that I had never create when I try to assemble it , and if I got lot of flavors. It looks like spent lot of time to find those directories that never exist. Can I skip those step ? If I skip those step, would it help me to optimize build time ?
e
I think it does not impact the performance, the source set is pre-set and passed to KotlinCompiler, all it needs to check is like
Copy code
fileTree.forEach { File("...").exists() }
which is not a time consuming job. I also tried passing an empty set to “debug” source set, logs were printed still (looks like there is a fallback-value mechanism). So take it easy and just ignore them.
Copy code
sourceSets["debug"].java.setSrcDirs(setOf<String>())
sourceSets["debug"].kotlin.setSrcDirs(setOf<String>())
👍 1
😄 1
💯 1