[MPP] MppCompositeBuildIT: Implement sample6-KT-56712-umbrella-composite test
... for KT-56712
This commit is contained in:
committed by
Space Team
parent
83d1de56bf
commit
45a99d197a
+26
@@ -316,4 +316,30 @@ class MppCompositeBuildIT : KGPBaseTest() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@GradleAndroidTest
|
||||
fun `test - sample6-KT-56712-umbrella-composite - compileCommonMainKotlinMetadata`(
|
||||
gradleVersion: GradleVersion, agpVersion: String, jdkVersion: JdkVersions.ProvidedJdk,
|
||||
) {
|
||||
val producer = project("mpp-composite-build/sample6-KT-56712-umbrella-composite/producer", gradleVersion)
|
||||
val consumerA = project("mpp-composite-build/sample6-KT-56712-umbrella-composite/consumerA", gradleVersion)
|
||||
val consumerB = project("mpp-composite-build/sample6-KT-56712-umbrella-composite/consumerB", gradleVersion)
|
||||
|
||||
project(
|
||||
"mpp-composite-build/sample6-KT-56712-umbrella-composite/composite", gradleVersion,
|
||||
buildOptions = defaultBuildOptions.copy(androidVersion = agpVersion), buildJdk = jdkVersion.location
|
||||
) {
|
||||
settingsGradleKts.toFile().replaceText("<producer_path>", producer.projectPath.toUri().path)
|
||||
settingsGradleKts.toFile().replaceText("<consumerA_path>", consumerA.projectPath.toUri().path)
|
||||
settingsGradleKts.toFile().replaceText("<consumerB_path>", consumerB.projectPath.toUri().path)
|
||||
|
||||
build(":consumerA:compileCommonMainKotlinMetadata") {
|
||||
assertTasksExecuted(":consumerA:compileCommonMainKotlinMetadata")
|
||||
}
|
||||
|
||||
build(":consumerB:compileCommonMainKotlinMetadata") {
|
||||
assertTasksExecuted(":consumerB:compileCommonMainKotlinMetadata")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
includeBuild("<producer_path>")
|
||||
includeBuild("<consumerA_path>")
|
||||
includeBuild("<consumerB_path>")
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
linuxX64()
|
||||
linuxArm64()
|
||||
targetHierarchy.default()
|
||||
|
||||
sourceSets.commonMain.get().dependencies {
|
||||
implementation("org.jetbrains.sample:producer:1.0.0-SNAPSHOT")
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
object ConsumerCommonMain {
|
||||
init {
|
||||
ProducerCommonMain.helloFromProducer()
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
linuxX64()
|
||||
linuxArm64()
|
||||
targetHierarchy.default()
|
||||
|
||||
sourceSets.commonMain.get().dependencies {
|
||||
implementation("org.jetbrains.sample:producer:1.0.0-SNAPSHOT")
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
object ConsumerCommonMain {
|
||||
init {
|
||||
ProducerCommonMain.helloFromProducer()
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
|
||||
/* Loading a second plugin is necessary to ensure ClassLoader isolation */
|
||||
id("com.android.library")
|
||||
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdk = 33
|
||||
}
|
||||
|
||||
kotlin {
|
||||
android()
|
||||
jvm()
|
||||
linuxX64()
|
||||
linuxArm64()
|
||||
targetHierarchy.default()
|
||||
}
|
||||
|
||||
group = "org.jetbrains.sample"
|
||||
version = "1.0.0-SNAPSHOT"
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = "producer"
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
object ProducerCommonMain {
|
||||
fun helloFromProducer() = Unit
|
||||
}
|
||||
Reference in New Issue
Block a user