[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:
committed by
Space
parent
329991217a
commit
4ce3f87361
+1
@@ -365,6 +365,7 @@ class CommonizerIT : BaseGradleIT() {
|
|||||||
assertTasksRegisteredRegex(":p2.*compile.*")
|
assertTasksRegisteredRegex(":p2.*compile.*")
|
||||||
|
|
||||||
/* CInterops *shall not* require any compilation */
|
/* CInterops *shall not* require any compilation */
|
||||||
|
assertTasksNotExecuted(":p0.*compile.*")
|
||||||
assertTasksNotExecuted(":p1.*compile.*")
|
assertTasksNotExecuted(":p1.*compile.*")
|
||||||
assertTasksNotExecuted(":p2.*compile.*")
|
assertTasksNotExecuted(":p2.*compile.*")
|
||||||
}
|
}
|
||||||
|
|||||||
+14
@@ -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")
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
object P0CommonMain
|
||||||
+1
@@ -17,6 +17,7 @@ kotlin {
|
|||||||
|
|
||||||
commonMain.dependencies {
|
commonMain.dependencies {
|
||||||
implementation(project(":p1"))
|
implementation(project(":p1"))
|
||||||
|
implementation(project(":p0"))
|
||||||
}
|
}
|
||||||
|
|
||||||
targets.withType<KotlinNativeTarget>().forEach { target ->
|
targets.withType<KotlinNativeTarget>().forEach { target ->
|
||||||
|
|||||||
+1
@@ -9,5 +9,6 @@ pluginManagement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
include(":p0")
|
||||||
include(":p1")
|
include(":p1")
|
||||||
include(":p2")
|
include(":p2")
|
||||||
|
|||||||
Reference in New Issue
Block a user