[Gradle] Test that composite metadata artifact with resources only...
...doesn't fail metadata compilation of depending projects. ^KT-65315
This commit is contained in:
committed by
Space Team
parent
a18dca5728
commit
322940f228
+21
@@ -6,6 +6,7 @@
|
||||
package org.jetbrains.kotlin.gradle.mpp
|
||||
|
||||
import org.gradle.api.logging.configuration.WarningMode
|
||||
import org.gradle.internal.os.OperatingSystem
|
||||
import org.gradle.util.GradleVersion
|
||||
import org.jetbrains.kotlin.gradle.KOTLIN_VERSION
|
||||
import org.jetbrains.kotlin.gradle.idea.tcs.IdeaKotlinSourceDependency
|
||||
@@ -457,4 +458,24 @@ class MppCompositeBuildIT : KGPBaseTest() {
|
||||
build("projects")
|
||||
}
|
||||
}
|
||||
|
||||
@GradleTest
|
||||
fun `KT-65315 composite project with resources in metadata klib`(gradleVersion: GradleVersion) {
|
||||
val producer = project("mpp-composite-build/kt65315_with_resources_in_metadata_klib/producer", gradleVersion)
|
||||
|
||||
project(
|
||||
"mpp-composite-build/kt65315_with_resources_in_metadata_klib/consumer",
|
||||
gradleVersion,
|
||||
) {
|
||||
settingsGradleKts.toFile().replaceText("<producer_path>", producer.projectPath.toUri().path)
|
||||
|
||||
build(":consumerA:assemble") {
|
||||
assertTasksExecuted(":consumerA:compileCommonMainKotlinMetadata")
|
||||
assertTasksExecuted(":consumerA:compileNativeMainKotlinMetadata")
|
||||
if (OperatingSystem.current().isMacOsX) {
|
||||
assertTasksExecuted(":consumerA:compileAppleMainKotlinMetadata")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
linuxX64()
|
||||
iosX64()
|
||||
iosArm64()
|
||||
|
||||
sourceSets.commonMain.get().dependencies {
|
||||
implementation("org.jetbrains.sample:producerA:1.0.0-SNAPSHOT")
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package app
|
||||
|
||||
import lib.commonMain
|
||||
|
||||
fun appleMain() {
|
||||
commonMain()
|
||||
nativeMain()
|
||||
app()
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package app
|
||||
|
||||
fun app() = lib.commonMain()
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package app
|
||||
|
||||
import lib.commonMain
|
||||
|
||||
fun nativeMain() {
|
||||
app()
|
||||
commonMain()
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
include(":consumerA")
|
||||
|
||||
includeBuild("<producer_path>") {
|
||||
dependencySubstitution {
|
||||
substitute(module("org.jetbrains.sample:producerA")).using(project(":producerA"))
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
|
||||
group = "org.jetbrains.sample"
|
||||
version = "1.0.0-SNAPSHOT"
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
iosX64()
|
||||
iosArm64()
|
||||
linuxX64()
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package lib
|
||||
|
||||
fun commonMain() = ":)"
|
||||
+1
@@ -0,0 +1 @@
|
||||
💀🎺
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
include(":producerA")
|
||||
Reference in New Issue
Block a user