[mpp] Add test: pre-hmpp dependencies not reported in test source sets

Test source sets do not participate in the metadata compilations by
default, so the check misses them. This commit just encodes this
behavior into tests, without actually addressing it

KT-60724
This commit is contained in:
Dmitry Savvinov
2023-07-26 14:33:01 +02:00
committed by Space Team
parent 38cd8ee7e7
commit 2ab73f286a
2 changed files with 7 additions and 2 deletions
@@ -71,9 +71,9 @@ class PreHmppDependenciesDeprecationIT : KGPBaseTest() {
}
@GradleTest
fun testNoWarningsInPlatformSpecificSourceSets(gradleVersion: GradleVersion, @TempDir tempDir: Path) {
fun testNoWarningsInPlatformSpecificSourceSetsOrTests(gradleVersion: GradleVersion, @TempDir tempDir: Path) {
publishLibrary("preHmppLibrary", gradleVersion, tempDir)
checkDiagnostics(gradleVersion, "noWarningsInPlatformSpecificSourceSets", tempDir)
checkDiagnostics(gradleVersion, "noWarningsInPlatformSpecificSourceSetsOrTests", tempDir)
}
private fun checkDiagnostics(
@@ -18,4 +18,9 @@ kotlin {
implementation("org.jetbrains.kotlin.tests:preHmppLibrary:0.1")
}
}
// see KT-60724
sourceSets.getByName("commonTest").dependencies {
implementation("org.jetbrains.kotlin.tests:preHmppLibrary:0.1")
}
}