[Gradle] Implement test covering KT-56198 (composite: mpp-jvm to jvm)
This commit is contained in:
committed by
Space Team
parent
8aa50e9446
commit
2bda0c0c57
+28
@@ -206,4 +206,32 @@ class MppCompositeBuildIT : KGPBaseTest() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GradleTest
|
||||||
|
fun `test - sample3-KT-56198-singleTargetMpp-includingJvm - ide dependencies`(gradleVersion: GradleVersion) {
|
||||||
|
val producer = project("mpp-composite-build/sample3-KT-56198-singleTargetMpp-includingJvm/producerBuild", gradleVersion)
|
||||||
|
|
||||||
|
project("mpp-composite-build/sample3-KT-56198-singleTargetMpp-includingJvm/consumerBuild", gradleVersion) {
|
||||||
|
settingsGradleKts.toFile().replaceText("<producer_path>", producer.projectPath.toUri().path)
|
||||||
|
resolveIdeDependencies(":consumerA") { dependencies ->
|
||||||
|
assertOutputDoesNotContain("e: org.jetbrains.kotlin.gradle.plugin.ide")
|
||||||
|
dependencies["commonMain"].assertMatches(
|
||||||
|
kotlinStdlibDependencies,
|
||||||
|
jetbrainsAnnotationDependencies,
|
||||||
|
projectArtifactDependency(
|
||||||
|
Regular, "producerBuild::producerA", FilePathRegex(".*producerA/build/libs/producerA-1.0.0-SNAPSHOT.jar")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
dependencies["jvmMain"].assertMatches(
|
||||||
|
kotlinStdlibDependencies,
|
||||||
|
jetbrainsAnnotationDependencies,
|
||||||
|
dependsOnDependency(":consumerA/commonMain"),
|
||||||
|
projectArtifactDependency(
|
||||||
|
Regular, "producerBuild::producerA", FilePathRegex(".*producerA/build/libs/producerA-1.0.0-SNAPSHOT.jar")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
@file:Suppress("OPT_IN_USAGE")
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
kotlin("multiplatform")
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
jvm()
|
||||||
|
|
||||||
|
sourceSets.commonMain.get().dependencies {
|
||||||
|
implementation("org.jetbrains.sample:producerA:1.0.0-SNAPSHOT")
|
||||||
|
}
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
dependencyResolutionManagement {
|
||||||
|
repositories {
|
||||||
|
mavenLocal()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
include(":consumerA")
|
||||||
|
|
||||||
|
includeBuild("<producer_path>") {
|
||||||
|
dependencySubstitution {
|
||||||
|
substitute(module("org.jetbrains.sample:producerA")).using(project(":producerA"))
|
||||||
|
}
|
||||||
|
}
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
@file:Suppress("OPT_IN_USAGE")
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
kotlin("jvm")
|
||||||
|
`maven-publish`
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
group = "org.jetbrains.sample"
|
||||||
|
version = "1.0.0-SNAPSHOT"
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
create<MavenPublication>("maven") {
|
||||||
|
groupId = "org.jetbrains.sample"
|
||||||
|
artifactId = "producerA"
|
||||||
|
version = "1.0.0-SNAPSHOT"
|
||||||
|
from(components["java"])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
dependencyResolutionManagement {
|
||||||
|
repositories {
|
||||||
|
mavenLocal()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
include(":producerA")
|
||||||
Reference in New Issue
Block a user