[repo] fix KGP pom has multiple dependencies on KGP-api

This commit is contained in:
Yahor Berdnikau
2023-05-25 22:53:58 +02:00
committed by Space Team
parent 8c8f1718b9
commit 9f12dae117
2 changed files with 19 additions and 1 deletions
+7 -1
View File
@@ -104,7 +104,13 @@ fun Project.excludeGradleCommonDependencies(sourceSet: SourceSet) {
configurations[sourceSet.runtimeOnlyConfigurationName].excludeGradleCommonDependencies()
}
private val testPlugins = setOf("kotlin-gradle-plugin-api", "android-test-fixes", "gradle-warnings-detector", "kotlin-compiler-args-properties")
private val testPlugins = setOf(
"kotlin-gradle-plugin-api",
"android-test-fixes",
"gradle-warnings-detector",
"kotlin-compiler-args-properties",
"kotlin-gradle-plugin",
)
/**
* Common sources for all variants.
@@ -44,6 +44,18 @@ dependencies {
commonApi(project(":kotlin-gradle-plugin-api"))
commonApi(project(":kotlin-gradle-plugin-model"))
// Following two dependencies is a workaround for IDEA import to pick-up them correctly
commonCompileOnly(project(":kotlin-gradle-plugin-api")) {
capabilities {
requireCapability("org.jetbrains.kotlin:kotlin-gradle-plugin-api-common")
}
}
commonCompileOnly(project(":kotlin-gradle-plugin-model")) {
capabilities {
requireCapability("org.jetbrains.kotlin:kotlin-gradle-plugin-model-common")
}
}
commonCompileOnly(project(":compiler:incremental-compilation-impl"))
commonCompileOnly(project(":daemon-common"))
commonCompileOnly(project(":kotlin-daemon-client"))