Someone tried with Kotlin 1.4 to connect “org.jetb...
# kotlinx-html
b
Someone tried with Kotlin 1.4 to connect “org.jetbrains.kotlinx: kotlinx-html-js” not on MPP? Gradle 6.8 + Kotlin 1.4.10
Copy code
Caused by: org.gradle.internal.component.NoMatchingConfigurationSelectionException: No matching variant of org.jetbrains.kotlinx:kotlinx-html-js:0.7.2 was found. The consumer was configured to find a runtime of a library compatible with Java 14, packaged as a jar, and its dependencies declared externally, as well as attribute ‘org.jetbrains.kotlin.platform.type’ with value ‘jvm’ but:
 - Variant ‘jsIr-api’ capability org.jetbrains.kotlinx:kotlinx-html-js:0.7.2:
   - Incompatible because this component declares a usage of ‘kotlin-api’ of a component, as well as attribute ‘org.jetbrains.kotlin.platform.type’ with value ‘js’ and the consumer needed a runtime of a component, as well as attribute ‘org.jetbrains.kotlin.platform.type’ with value ‘jvm’
   - Other compatible attributes:
     - Doesn’t say anything about its component category (required a library)
     - Doesn’t say anything about how its dependencies are found (required its dependencies declared externally)
     - Doesn’t say anything about its target Java version (required compatibility with Java 14)
     - Doesn’t say anything about its elements (required them packaged as a jar)
b
I'm guessing you're using IR mode, which does not have that variant published for kotlinx-html (I've raised a pr to add it, but it's been unreviewed for couple of months now). Change it to LEGACY and it should work