Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.7.0-alpha01 is incompatible with KGP 2.0.0 when using android projects #5061

Open
ZacSweers opened this issue Jul 3, 2024 · 3 comments
Open
Labels
bug Something isn't working reproduced submitted

Comments

@ZacSweers
Copy link

Describe the bug
1.7.0-alpha01 fails during gradle sync when used with an android application target.

Caused by: org.gradle.api.InvalidUserDataException: Cannot change hierarchy of dependency configuration ':androidTestImplementation' after it has been included in dependency resolution.
	at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.preventIllegalMutation(DefaultConfiguration.java:1475)
	at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.validateMutation(DefaultConfiguration.java:1414)
	at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.extendsFrom(DefaultConfiguration.java:404)
	at org.jetbrains.kotlin.gradle.utils.GradleConfigurationUtilsKt.addExtendsFromRelation(gradleConfigurationUtils.kt:25)
	at org.jetbrains.kotlin.gradle.utils.GradleConfigurationUtilsKt.addExtendsFromRelation$default(gradleConfigurationUtils.kt:18)
	at org.jetbrains.kotlin.gradle.plugin.AndroidProjectHandler.addKotlinDependenciesToAndroidSourceSets$addDependenciesToAndroidSourceSet(AndroidProjectHandler.kt:131)
	at org.jetbrains.kotlin.gradle.plugin.AndroidProjectHandler.addKotlinDependenciesToAndroidSourceSets(AndroidProjectHandler.kt:141)
	at org.jetbrains.kotlin.gradle.plugin.AndroidProjectHandler.access$addKotlinDependenciesToAndroidSourceSets(AndroidProjectHandler.kt:52)
	at org.jetbrains.kotlin.gradle.plugin.AndroidProjectHandler$configureTarget$2.invoke(AndroidProjectHandler.kt:98)
	at org.jetbrains.kotlin.gradle.plugin.AndroidProjectHandler$configureTarget$2.invoke(AndroidProjectHandler.kt:88)
	at org.jetbrains.kotlin.gradle.utils.WhenEvaluatedKt$whenEvaluated$2.execute(whenEvaluated.kt:19)
	at org.jetbrains.kotlin.gradle.utils.WhenEvaluatedKt$whenEvaluated$2.execute(whenEvaluated.kt:19)
	at  ...

Affected platforms

Gradle plugin

Versions

  • Libraries:
    • Compose Multiplatform version: 1.7.0-alpha01
  • Kotlin version: 2.0.0
  • Gradle 8.8
  • KGP 2.0.0
  • AGP 8.5.0

To Reproduce
Steps to reproduce the behavior:

  1. Checkout this repo: https://github.com/zacsweers/fieldspottr
  2. Change the compose multiplatform version to 1.7.0-alpha01
  3. Try to sync in the IDE

Expected behavior
I expect it not to fail during sync

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@ZacSweers ZacSweers added bug Something isn't working submitted labels Jul 3, 2024
@Him188
Copy link

Him188 commented Jul 4, 2024

FYI: I was able to switch to 1.7.0-alpha01 with Kotlin 2.0.0 and Android. open-ani/ani#502 might help you?

@ZacSweers
Copy link
Author

Doesn't help the repro case I've provided above

@mshdabiola
Copy link

I am facing same issue

A problem occurred configuring project ':composeApp'.

Cannot change hierarchy of dependency configuration ':composeApp:jvmCompilationApi' after it has been included in dependency resolution.

Caused by: org.gradle.api.InvalidUserDataException: Cannot change hierarchy of dependency configuration ':composeApp:jvmCompilationApi' after it has been included in dependency resolution.
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.preventIllegalMutation(DefaultConfiguration.java:1475)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reproduced submitted
Projects
None yet
Development

No branches or pull requests

4 participants