When I add the following to all my submodules: ```...
# coroutines
s
When I add the following to all my submodules:
Copy code
tasks.withType(KotlinCompile) {
    kotlinOptions.freeCompilerArgs += ["-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi"]
}
I notice I get the following error in modules that don't use coroutines at all:
Copy code
e: Experimental API marker kotlinx.coroutines.ExperimentalCoroutinesApi is unresolved. Please make sure it's present in the module dependencies
Anyone know of a fix?
g
Maybe you applied this compiler config to module without coroutines in dependencies? Do you use allprojects/subprojects block?
s
yes, that's exactly what I do
hmmmm, is there a way to inspect the dependencies and apply it carefully?
g
I would just apply it to particular modules or add kotlinx.coroutines dependency as simple solution
s
I tried to avoid setting it manually, as my teams project has so many modules (like 50+). I'm setting it based on module project dir now. I have high hopes this will work.
yes. it worked. Thanks for all your help @gildor
👍 1