Skip to content

Add support for new Android-KMP plugin #820

Open
@thomaskioko

Description

@thomaskioko

Hey @Alex009 I am trying to migrate my project to the new Android KMP plugin but I am getting this exception.

:i18n:generator is my kmp module with moko resources configuration.

Error ``` Configuration cache state could not be cached: field `classpath` of task `:i18n:generator:compileJvmMainJava` of type `org.gradle.api.tasks.compile.JavaCompile`: error writing value of type 'org.gradle.api.internal.file.UnionFileCollection' > Could not resolve all files for configuration ':i18n:generator:jvmMainCompileClasspath'. > Could not resolve dev.icerock.moko:resources:0.24.5.

The consumer was configured to find a library for use during compile-time, compatible with Java 23, preferably in the form of class files, preferably optimized for standard JVMs, and its dependencies declared externally. However we cannot choose between the following variants of dev.icerock.moko:resources:0.24.5:
- debugApiElements-published
- debugRuntimeElements-published
- jvmApiElements-published
- jvmRuntimeElements-published
- releaseApiElements-published
- releaseRuntimeElements-published
All of them match the consumer attributes:
- Variant 'debugApiElements-published' capability 'dev.icerock.moko:resources:0.24.5' declares a library for use during compile-time:
- Unmatched attributes:
- Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
- Doesn't say anything about its elements (required them preferably in the form of class files)
- Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
- Doesn't say anything about its target Java version (required compatibility with Java 23)
- Provides attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' but the consumer didn't ask for it
- Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but the consumer didn't ask for it
- Provides release status but the consumer didn't ask for it
- Variant 'debugRuntimeElements-published' capability 'dev.icerock.moko:resources:0.24.5' declares a library for use during runtime:
- Unmatched attributes:
- Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
- Doesn't say anything about its elements (required them preferably in the form of class files)
- Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
- Doesn't say anything about its target Java version (required compatibility with Java 23)
- Provides attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' but the consumer didn't ask for it
- Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but the consumer didn't ask for it
- Provides release status but the consumer didn't ask for it
- Variant 'jvmApiElements-published' capability 'dev.icerock.moko:resources:0.24.5' declares a library for use during compile-time, packaged as a jar:
- Unmatched attributes:
- Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
- Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
- Doesn't say anything about its target Java version (required compatibility with Java 23)
- Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but the consumer didn't ask for it
- Provides release status but the consumer didn't ask for it
- Variant 'jvmRuntimeElements-published' capability 'dev.icerock.moko:resources:0.24.5' declares a library for use during runtime, packaged as a jar:
- Unmatched attributes:
- Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
- Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
- Doesn't say anything about its target Java version (required compatibility with Java 23)
- Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but the consumer didn't ask for it
- Provides release status but the consumer didn't ask for it
- Variant 'releaseApiElements-published' capability 'dev.icerock.moko:resources:0.24.5' declares a library for use during compile-time:
- Unmatched attributes:
- Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
- Doesn't say anything about its elements (required them preferably in the form of class files)
- Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
- Doesn't say anything about its target Java version (required compatibility with Java 23)
- Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but the consumer didn't ask for it
- Provides release status but the consumer didn't ask for it
- Variant 'releaseRuntimeElements-published' capability 'dev.icerock.moko:resources:0.24.5' declares a library for use during runtime:
- Unmatched attributes:
- Doesn't say anything about how its dependencies are found (required its dependencies declared externally)
- Doesn't say anything about its elements (required them preferably in the form of class files)
- Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
- Doesn't say anything about its target Java version (required compatibility with Java 23)
- Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but the consumer didn't ask for it
- Provides release status but the consumer didn't ask for it

</details>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions