Closed ZacSweers closed 1 day ago
FYI: I was able to switch to 1.7.0-alpha01 with Kotlin 2.0.0 and Android. https://github.com/open-ani/ani/pull/502 might help you?
Doesn't help the repro case I've provided above
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)
./gradlew
One of these changes fixes the issue:
alias(libs.plugins.aboutLicenses)
org.gradle.configuration-cache=true
The issue is either in Compose Gradle plugin or in the aboutLicenses
plugin - it needs further investigation.
I have looked briefly into this problem. And it appears to be caused by the following call accessing the resolvedConfigurations
during task execution:
configuration.resolvedConfiguration
Moving the code to the action
method of the task will resolve it, however, this won't allow the access to Task.project
braking configuration cache as we can't use project
at the later time:
invocation of 'Task.project' at execution time is unsupported.
This is shown in this following reproducible example: plugin-demo.zip
To enable support for configuration cache, the plugin has to resolve the dependencies during configuration time. The plugin might require larger refactors like it was done in licensee, if we can't use the dependencies anymore the way they are resolved right now. (cashapp/licensee/issues/72)
Describe the bug 1.7.0-alpha01 fails during gradle sync when used with an android application target.
Affected platforms
Gradle plugin
Versions
To Reproduce Steps to reproduce the behavior:
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.