https://kotlinlang.org logo
#gradle
Title
n

natario1

09/02/2020, 8:12 PM
Running into this crash after update to 1.4.0. Can the automatic stdlib injection be disabled? Don't want to spend two weeks understanding which plugin is conflicting here and how to fix it...
Copy code
> Cannot change dependencies of dependency configuration ':effects-frontend:api' after it has been included in dependency resolution.

* Try:
Run with --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.internal.tasks.TaskDependencyResolveException: Could not determine the dependencies of task ':effects-frontend:compileDebugRenderscript'.
Caused by: org.gradle.api.InvalidUserDataException: Cannot change dependencies of dependency configuration ':effects-frontend:api' after it has been included in dependency resolution.
	at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.preventIllegalMutation(DefaultConfiguration.java:1134)
org.jetbrains.kotlin.gradle.internal.KotlinDependenciesManagementKt.chooseAndAddStdlibDependency(KotlinDependenciesManagement.kt:136)
	at org.jetbrains.kotlin.gradle.internal.KotlinDependenciesManagementKt.access$chooseAndAddStdlibDependency(KotlinDependenciesManagement.kt:1)
	at org.jetbrains.kotlin.gradle.internal.KotlinDependenciesManagementKt$configureStdlibDefaultDependency$$inlined$with$lambda$1$1.invoke(KotlinDependenciesManagement.kt:79)
	at org.jetbrains.kotlin.gradle.internal.KotlinDependenciesManagementKt$configureStdlibDefaultDependency$$inlined$with$lambda$1$1.invoke(KotlinDependenciesManagement.kt)
Seems like a bug, since the Kotlin plugin is trying to catch this exception but somehow it's not doing it right: https://github.com/JetBrains/kotlin/blob/master/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/internal/KotlinDependenciesManagement.kt#L311-L327