From 679e768464b80f457d4ae93d4b81a81fcff10643 Mon Sep 17 00:00:00 2001 From: Yaroslav Chernyshev Date: Wed, 9 Jun 2021 15:11:48 +0300 Subject: [PATCH] Fix adding non-directory to resources for Android source set #KTIJ-17113 Fixed --- .../kotlin/gradle/NewMultiplatformProjectImportingTest.kt | 2 -- .../kotlin/gradle/plugin/mpp/syncKotlinAndAndroidSourceSets.kt | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/NewMultiplatformProjectImportingTest.kt b/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/NewMultiplatformProjectImportingTest.kt index 94f3e6d0b099a..a0c316bea1cdb 100644 --- a/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/NewMultiplatformProjectImportingTest.kt +++ b/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/NewMultiplatformProjectImportingTest.kt @@ -639,8 +639,6 @@ class NewMultiplatformProjectImportingTest : MultiplePluginVersionGradleImportin checkProjectStructure(exhaustiveModuleList = false, exhaustiveDependencyList = false, exhaustiveSourceSourceRootList = false) { module("multiplatformb") { sourceFolder("multiplatformb/src/androidMain/kotlin", JavaSourceRootType.SOURCE) - - } } } diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/syncKotlinAndAndroidSourceSets.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/syncKotlinAndAndroidSourceSets.kt index 53a6f32c2f45e..259a356197ea7 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/syncKotlinAndAndroidSourceSets.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/syncKotlinAndAndroidSourceSets.kt @@ -105,7 +105,7 @@ private fun syncKotlinAndAndroidResources( val project = target.project - androidSourceSet.resources.srcDirs(*kotlinSourceSet.resources.toList().toTypedArray()) + androidSourceSet.resources.srcDirs(*kotlinSourceSet.resources.srcDirs.toList().toTypedArray()) if (androidSourceSet.resources.srcDirs.isNotEmpty()) { androidSourceSet.resources.srcDir(defaultSourceFolder(project, kotlinSourceSet.name, "resources")) kotlinSourceSet.resources.srcDirs(androidSourceSet.resources.srcDirs)