Fix gradle api dependency version in variants

Common SourceSet was forcing gradle api version to be the same
in all plugin variants via 'extendsFrom(..)'.

^KT-49227 In Progress
This commit is contained in:
Yahor Berdnikau
2022-04-06 16:08:53 +02:00
committed by Space
parent 1e444e0451
commit 78cc2365b0
5 changed files with 52 additions and 31 deletions
@@ -14,11 +14,7 @@ dependencies {
implementation(kotlinStdlib())
testImplementation(gradleApi())
testImplementation(gradleKotlinDsl())
testImplementation(project(":kotlin-gradle-plugin")) {
capabilities {
requireCapability("org.jetbrains.kotlin:kotlin-gradle-plugin-common")
}
}
testImplementation(project(":kotlin-gradle-plugin"))
testImplementation(project(":kotlin-gradle-statistics"))
testImplementation(project(":kotlin-test:kotlin-test-junit"))
@@ -99,11 +99,7 @@ class UpToDateIT : KGPBaseTest() {
val originalPaths get() = originalCompilerCp.map { it.replace("\\", "/") }.joinToString(", ") { "'$it'" }
override fun initProject(project: TestProject) = with(project) {
val pluginSuffix = if (project.gradleVersion < GradleVersion.version("7.0")) {
"kotlin_gradle_plugin"
} else {
"kotlin_gradle_plugin_gradle70"
}
val pluginSuffix = "kotlin_gradle_plugin"
buildGradle.appendText(
"\nafterEvaluate { println 'compiler_cp=' + compileKotlin.getDefaultCompilerClasspath\$$pluginSuffix().toList() }"
)