In Kotlin multiplatform when i try to use compose module interface or class in non-compose module getting this error when i do maven-publish in windows and ios. For example i created a project and added PR with error message https://github.com/yuvaraj119/Expressus-temp/pull/1
In windows when i run the app it works perfectly no crash
but when i do maven-publish it throws error.
unable to publish only the non-compose module which is consuming compose module.
where all other modules which are not consuming compose module gets published.
even the compose module gets published.
In mac maven-publish get failed and non of the module gets published below mac error
Could not resolve all task dependencies for configuration ':shared:iosArm64CompileKlibraries'.
Could not resolve project :shared-ui-compose.
Required by:
project :shared
> No matching variant of project :shared-ui-compose was found. The consumer was configured to find a usage of 'kotlin-api' of a library, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native', attribute 'org.jetbrains.kotlin.native.target' with value 'ios_arm64' but:
- Variant 'debugApiElements' capability Expressus:shared-ui-compose:unspecified declares an API of a library, preferably optimized for Android:
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_arm64')
- Variant 'debugRuntimeElements' capability Expressus:shared-ui-compose:unspecified declares a runtime of a library, preferably optimized for Android:
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_arm64')
- Variant 'jvmApiElements' capability Expressus:shared-ui-compose:unspecified declares an API of a library, preferably optimized for standard JVMs:
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_arm64')
- Variant 'jvmRuntimeElements' capability Expressus:shared-ui-compose:unspecified declares a runtime of a library, preferably optimized for standard JVMs:
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_arm64')
- Variant 'metadataApiElements' capability Expressus:shared-ui-compose:unspecified declares a library, preferably optimized for non-jvm:
- Incompatible because this component declares a usage of 'kotlin-metadata' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_arm64')
- Variant 'releaseApiElements' capability Expressus:shared-ui-compose:unspecified declares an API of a library, preferably optimized for Android:
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_arm64')
- Variant 'releaseRuntimeElements' capability Expressus:shared-ui-compose:unspecified declares a runtime of a library, preferably optimized for Android:
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_arm64')```