After upgrading to Gradle 8.1 (from 7.X) I got `Consumable configurations with identical capabilitie...
s

Stefan Oltmann

about 2 years ago
After upgrading to Gradle 8.1 (from 7.X) I got
Consumable configurations with identical capabilities within a project (other than the default configuration) must have unique attributes, but configuration ':shared:releaseFrameworkIosFat' and [configuration ':shared:releaseFrameworkIosArm64'] contain identical attribute sets. Consider adding an additional attribute to one of the configurations to disambiguate them.
I fail to understand where this does come from and what I should do. This is part of the configuration in `shared`:
listOf(
    /* App Store */
    iosArm64(),
    /* Apple Silicon iOS Simulator */
    iosSimulatorArm64(),
    /* Intel macOS Devices */
    macosX64()
).forEach {

    it.binaries.framework(
        buildTypes = setOf(NativeBuildType.RELEASE)
    ) {
        baseName = "shared"
        /* Bitcode was deprecated with XCode 14 */
        embedBitcode("disable")
        /* Exported dependencies */
        export("com.appmattus.crypto:cryptohash:${Versions.cryptoHash}")
    }
}

    val iosArm64Main by sourceSets.getting
    val iosSimulatorArm64Main by sourceSets.getting
    val macosX64Main by sourceSets.getting
//    val macosArm64Main by sourceSets.getting

    @Suppress("UnusedPrivateMember", "UNUSED_VARIABLE") // False positive
    val appleMain by sourceSets.creating {

        iosArm64Main.dependsOn(this)
        iosSimulatorArm64Main.dependsOn(this)
        macosX64Main.dependsOn(this)
//        macosArm64Main.dependsOn(this)

        dependencies {

            // Networking
            api("io.ktor:ktor-client-ios:${Versions.ktor}")

            // Database
            api("com.squareup.sqldelight:native-driver:${Versions.sqlDelight}")
        }
    }
1