I’m facing the error: ```Could not determine the d...
# multiplatform
m
I’m facing the error:
Copy code
Could not determine the dependencies of task ':shared:cinteropRevenueCatIosArm64'.
> Could not resolve all dependencies for configuration ':shared:iosArm64CInterop'.
   > Consumable configurations with identical capabilities within a project (other than the default configuration) must have unique attributes, but configuration ':shared:podDebugFrameworkIosFat' and [configuration ':shared:debugFrameworkIosFat'] 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.1/userguide/upgrading_version_7.html#unique_attribute_sets> in the Gradle documentation.
and when I try to set some unique attributes, as per https://youtrack.jetbrains.com/issue/KT-55751, I get:
Copy code
Configuration with name 'podDebugFrameworkIosFat' not found.
last comment on the linked issue is supposed to solve the problem but it doesn’t. any help?
m
I thought that was fixed in KGP 1.9.0 (or maybe 1.9.20?) What version are you using?
m
this is inside my `shared.build.gradle.kts`:
Copy code
kotlin {
    androidTarget()
    listOf(
        iosX64(),
        iosArm64(),
        iosSimulatorArm64(),
    ).forEach { iosTarget ->
        iosTarget.binaries {
            framework {
                baseName = "shared"
            }
        }
    }

    cocoapods {
        version = "1.0.0"
        summary = "Compose application framework"
        homepage = "empty"
        ios.deploymentTarget = "11.0"
        podfile = project.file("../iosApp/Podfile")

        pod("RevenueCat")
        pod("Sentry", "~> 8.4.0")
    }
...
}
error is in 1.8.20, 1.8.22, 1.9.0
m
This issue says 1.9.20-Beta indeed 🤔
m
but the weird thing is that when I create new project and copy/paste gradle configuration it works fine
m
when I try to set some unique attributes
Copy code
Configuration with name 'podDebugFrameworkIosFat' not found.
There's always the trick of slapping everything in some
afterEvaluate {}
block
It's ugly but maybe it'll give time to KGP to create the configurations
m
my gradle knowledge is limited, I’ve been running from it as much as I could 😄. can you be a bit more specific?
m
Copy code
afterEvaluate {
  configurations.named("podDebugFrameworkIosFat").configure { 
    attributes {
        // put a unique attribute
        attribute(myAttribute, "pod-debug")
    }
  }
  ...
}
Or something like this:
Copy code
configurations.all {
  if (name == "podDebugFrameworkIosFat") {
    attributes {
      // put a unique attribute
      attribute(myAttribute, "pod-debug")
    }
  }
}
m
uhm, let me try
then I’m getting the
Could not determine the dependencies of task
error
m
Can you strip your project into a minimal reproducer, that'd help a lot investigating this.
m
but if everything fails I’ll use the trick that worked for me 3 or 4 times in the past when I get into gradle issue I can’t resolve: create new project, copy/paste everything into it and that’s it. if everything fails I hope this will work… again
I tried creating reproducer but reproducer works fine 😄, doesn’t have the issue with all the same code
since switching to compose multiplatform I’m forced to deal with Gradle more and more
I copy/pasted everything into new project and it syncs fine…
m
No more problem 😄
m
there are other problems now but those ones are resolved
but I’m really tired of doing this every time new version of compose multiplatform is released
I would prefer everything to work or to be solvable inside original project
project is minimal anyways (especially gradle and related things), can you maybe take a look at it?
m
Yea of course if you have a reproducer, it will help in all cases, even if not minimal
135 Views