Skip to content

Commit 22c81b2

Browse files
committed
Add KotlinPlatformType.jvm attribute to apolloDependencies configuration, to fix "More than one variant of project :apollo-runtime matches the consumer attributes" Gradle error.
Not entirely sure why this is now needed, but that fixes it.
1 parent 4587f31 commit 22c81b2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

intellij-plugin/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import org.jetbrains.intellij.platform.gradle.TestFrameworkType
66
import org.jetbrains.intellij.platform.gradle.tasks.VerifyPluginTask.FailureLevel.INTERNAL_API_USAGES
77
import org.jetbrains.intellij.platform.gradle.tasks.VerifyPluginTask.FailureLevel.INVALID_PLUGIN
88
import org.jetbrains.intellij.platform.gradle.tasks.VerifyPluginTask.FailureLevel.PLUGIN_STRUCTURE_WARNINGS
9+
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
910
import java.net.URI
1011
import java.text.SimpleDateFormat
1112
import java.util.Date
@@ -55,6 +56,9 @@ kotlin {
5556
}
5657

5758
val apolloDependencies = configurations.create("apolloDependencies").apply {
59+
attributes {
60+
attribute(KotlinPlatformType.attribute, KotlinPlatformType.jvm)
61+
}
5862
listOf(":apollo-annotations", ":apollo-api", ":apollo-runtime").forEach {
5963
dependencies.add(project.dependencies.project(it, "jvmApiElements"))
6064
}

0 commit comments

Comments
 (0)