https://kotlinlang.org logo
#kotlin-native
Title
# kotlin-native
u

ubuntudroid

10/02/2023, 10:45 AM
After upgrading my KMP project to Kotlin 1.9.10 and ksp 1.9.10-1.0.13 I’m getting the following error during project configuration:
Copy code
A problem occurred configuring project ':shared'.
> Could not create task ':shared:kspKotlinIosX64'.
   > Could not resolve all dependencies for configuration ':shared:kspKotlinIosX64ProcessorClasspath'.
      > Consumable configurations with identical capabilities within a project (other than the default configuration) must have unique attributes, but configuration ':shared:iosArm64CInteropApiElements' and [configuration ':shared:archives'] contain identical attribute sets. Consider adding an additional attribute to one of the configurations to disambiguate them.  Run the 'outgoingVariants' task for more details. For more information, please refer to <https://docs.gradle.org/8.2/userguide/upgrading_version_7.html#unique_attribute_sets> in the Gradle documentation.
Anyone having an idea what might be causing this? A quick Google search and a search through reported KSP issues didn’t reveal anything.
The issue seems to be caused by a bug in Kotlin 1.9. See https://youtrack.jetbrains.com/issue/KT-55751/MPP-Gradle-Consumable-configurations-must-have-unique-attributes Unfortunately, I cannot apply the proposed fix in that ticket (adding additional dummy attributes) as configuration attribute propagation still doesn’t seem to work in all cases in Kotlin 1.9.20-Beta2 and workarounds to configure attributes later don’t work as well, as I’m using moko-resources which doesn’t use configuration providers yet (a PR is in the works though) and causes an early resolution of the affected configurations. So it looks like I need to stay with 1.8 for now…
2 Views