[Gradle] CommonizerIT: Add failing test when depending on project without c-interops

Adapted existing `test KT-47641 commonizing c-interops does not depend on any source compilation`
to add a project dependency from a project with c-interops (p2)
to a project without any c-interops (p0)

This leads to compilation of project p0, since the
cinteropApiElements configuration was not created on p0
This commit is contained in:
sebastian.sellmair
2021-07-23 15:04:54 +02:00
committed by Space
parent 329991217a
commit 4ce3f87361
5 changed files with 18 additions and 0 deletions
@@ -365,6 +365,7 @@ class CommonizerIT : BaseGradleIT() {
assertTasksRegisteredRegex(":p2.*compile.*")
/* CInterops *shall not* require any compilation */
assertTasksNotExecuted(":p0.*compile.*")
assertTasksNotExecuted(":p1.*compile.*")
assertTasksNotExecuted(":p2.*compile.*")
}
@@ -0,0 +1,14 @@
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
plugins {
kotlin("multiplatform")
}
kotlin {
jvm()
js().nodejs()
linuxX64()
macosX64()
mingwX64("windowsX64")
mingwX86("windowsX86")
}
@@ -17,6 +17,7 @@ kotlin {
commonMain.dependencies {
implementation(project(":p1"))
implementation(project(":p0"))
}
targets.withType<KotlinNativeTarget>().forEach { target ->
@@ -9,5 +9,6 @@ pluginManagement {
}
}
include(":p0")
include(":p1")
include(":p2")