Vsevolod Ganin
03/13/2023, 1:58 PMCannot change attributes of dependency configuration ':<module>:iosApiElements' after it has been resolved
in Gradle configuration phase with 1.8.10-1.0.9 after upgrading from 1.7.21-1.0.8. It goes away if I remove kspIos
dependency. kspAndroid
works fine either way. And I can’t reproduce in official multiplatform sample in KSP repo unfortunately. Maybe someone has a clue where to look for a problem in my project configuration?tapchicoma
03/13/2023, 2:54 PMVsevolod Ganin
03/14/2023, 5:31 PMproject.afterEvaluate {
project.tasks.withType(KotlinCompile) { ... }
}
And the fix is
project.afterEvaluate {
project.tasks.withType(KotlinCompile).configureEach { ... }
}
(the part project.afterEvaluate
may not be relevant to the issue)
So, considering the thread above, the problem apparently is that the first variant triggers configuration of all KotlinCompile
tasks eagerly, and the second variant enables configuration avoidance/laziness. Tricky!