ribesg
06/02/2022, 2:23 PMNo matching variant of <myKmpLib> was found. The consumer was configured to find a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common'
While trying to build a shared
module of a KMM app having a dependency on a KMP library defined in its commonMain
sourceSetLouis Gautier
06/02/2022, 2:25 PMribesg
06/02/2022, 2:27 PMandroid()
jvm()
and ios()
. The KMM project was generated by the KMM plugin and has android()
iosArm64()
iosX64()
and iosSimulatorArm64()
.ribesg
06/02/2022, 2:27 PMios()
doesn’t trigger itribesg
06/02/2022, 2:27 PMiosSimulatorArm64()
to the KMP project and made a version but now I have this weird errorLouis Gautier
06/02/2022, 2:28 PMLouis Gautier
06/02/2022, 2:29 PMribesg
06/02/2022, 2:30 PMsourceSets.getByName("iosSimulatorArm64Main") {
dependsOn(sourceSets.getByName("iosMain"))
}
I actually forgot for iosTest
, but would that produce this error message? Seems unrelatedLouis Gautier
06/02/2022, 2:31 PMLouis Gautier
06/02/2022, 2:32 PMribesg
06/02/2022, 2:32 PMiosArm64
and iosX64
generated by the KMM plugin with the automatic ios()
config but it didn’t change anythingLouis Gautier
06/02/2022, 2:35 PMLouis Gautier
06/02/2022, 2:36 PMsourceSets.getByName("iosSimulatorArm64Main")
val iosSimulator by getting
ribesg
06/02/2022, 2:36 PMorg.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
in my buildSrc
, and there seem to be no access to sourceSets { }
thereribesg
06/02/2022, 2:37 PMribesg
06/02/2022, 2:39 PMLouis Gautier
06/02/2022, 2:41 PMribesg
06/02/2022, 2:42 PMLouis Gautier
06/02/2022, 2:43 PMribesg
06/02/2022, 2:44 PMLouis Gautier
06/02/2022, 2:45 PMribesg
06/02/2022, 2:45 PMLouis Gautier
06/02/2022, 2:46 PMribesg
06/02/2022, 2:49 PMribesg
06/02/2022, 2:50 PMmbonnin
06/02/2022, 2:54 PMcompileXyzKotlinMetadata
?ribesg
06/02/2022, 2:54 PMribesg
06/02/2022, 2:54 PMmbonnin
06/02/2022, 2:54 PMmbonnin
06/02/2022, 2:55 PMmbonnin
06/02/2022, 2:56 PMtasks.configureEach {
if (name.endsWith("KotlinMetadata")) {
enabled = false
}
}
(pardon if it's not 100% Gradle-lazy-idiomatic but I think it is?)ribesg
06/02/2022, 2:56 PMgradle.properties
configurations of the two projects?mbonnin
06/02/2022, 2:57 PMmbonnin
06/02/2022, 2:57 PMribesg
06/02/2022, 3:02 PM