From 824efe84986464bde14a27a5233da32b484d5d4f Mon Sep 17 00:00:00 2001 From: Dmitry Savvinov Date: Fri, 11 Dec 2020 17:19:44 +0300 Subject: [PATCH] Remove useless condition Note that in previous line we already check for !isHmppEnabled and for sourceSet.name == KotlinSourceSet.COMMON_TEST_SOURCE_SET_NAME, and if it holds, then we continue to the next loop iteration. So, this conditional here is essentually equal to 'false' --- idea/kotlin-gradle-tooling/src/KotlinMPPGradleModelBuilder.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idea/kotlin-gradle-tooling/src/KotlinMPPGradleModelBuilder.kt b/idea/kotlin-gradle-tooling/src/KotlinMPPGradleModelBuilder.kt index fde454631ee..da49368ed68 100644 --- a/idea/kotlin-gradle-tooling/src/KotlinMPPGradleModelBuilder.kt +++ b/idea/kotlin-gradle-tooling/src/KotlinMPPGradleModelBuilder.kt @@ -822,10 +822,10 @@ class KotlinMPPGradleModelBuilder : ModelBuilderService { } } - (allSourceSetToCompilations[sourceSet]?.all { it.isTestModule } - ?: if (!isHMPPEnabled && sourceSet.name == KotlinSourceSet.COMMON_TEST_SOURCE_SET_NAME) true else null)?.let { isTest -> + allSourceSetToCompilations[sourceSet]?.all { it.isTestModule }?.let { isTest -> sourceSet.isTestModule = isTest } + (allSourceSetToCompilations[sourceSet])?.let { compilations -> val platforms = compilations.map { it.platform } sourceSet.actualPlatforms.addSimplePlatforms(platforms)