I'm asking because some time ago I figured out how...
# multiplatform
d
I'm asking because some time ago I figured out how to explicitly select one of multiple source sets that have the same target (jvm) - which fixes this issue -
```
Copy code
Cannot choose between the following variants of project :platform:
  - injectJvmApiElements
  - remoteJvmApiElements
All of them match the consumer attributes:
  - Variant 'injectJvmApiElements' capability capture-age:platform:hc2-0.1.6:
      - Unmatched attribute:
          - Found org.jetbrains.kotlin.localToProject 'public' but wasn't required.
      - Compatible attributes:
          - Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
          - Required org.jetbrains.kotlin.platform.type 'jvm' and found compatible value 'jvm'.
  - Variant 'remoteJvmApiElements' capability capture-age:platform:hc2-0.1.6:
      - Unmatched attribute:
          - Found org.jetbrains.kotlin.localToProject 'public' but wasn't required.
      - Compatible attributes:
          - Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
          - Required org.jetbrains.kotlin.platform.type 'jvm' and found compatible value 'jvm'.
Now with the same version of gradle I have this problem again after it worked before
Copy code
val platform = project(":platform")
    println(platform.configurations.joinToString { it.name })
    val configurationName = (findProperty("platform")?.toString() ?: "remote") + "JvmApiElements"

    sourceSets["commonMain"].dependencies {
        api(engine)
        api(platform)
    }

    sourceSets["jvmMain"].dependencies {
        api(project(":platform", configurationName))
    }
At the end is an example of how to select the configuration explicitly
It configures fine, but it complains about the
api(platform)
for the commonMain source set when I run
jvmJar
task