Browse Source

[gradle] Fix task configuration (use configureEach instead all). (#5076)

Fixes https://github.com/JetBrains/compose-multiplatform/issues/5061

## Release Notes
### Fixes - Gradle Plugin
- _(prerelease fix)_ Fix "InvalidUserDataException: Cannot change
hierarchy of dependency configuration" on Gradle sync
pull/5079/head
Konstantin 5 months ago committed by GitHub
parent
commit
9f8a3a242c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/AndroidResources.kt

2
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources/AndroidResources.kt

@ -122,7 +122,7 @@ internal fun Project.configureAndroidAssetsForPreview() {
if (androidComponents.pluginVersion >= agp_8_1_0) {
// addGeneratedSourceDirectory doesn't mark the output directory as assets hence AS Compose Preview doesn't work
tasks.all { task ->
tasks.configureEach { task ->
if (task.name == kgpCopyAssetsTaskName) {
task.outputs.files.forEach { file ->
addStaticSourceDirectory(file.path)

Loading…
Cancel
Save