File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/resources Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -111,16 +111,18 @@ private fun Project.configureKmpResources(
111111 // TODO temporary API misuse. will be changed on the KMP side
112112 // https://youtrack.jetbrains.com/issue/KT-70909
113113 val target = compilation.target
114- val kmpResourceRoot = KotlinTargetResourcesPublication .ResourceRoot (
115- allCompilationResources,
116- emptyList(),
117- emptyList()
118- )
119114 val kmpEmptyPath = provider { File (" " ) }
115+ val emptyDir = layout.buildDirectory.dir(" $RES_GEN_DIR /emptyResourcesDir" ).map { it.asFile }
120116 logger.info(" Configure KMP component publication for '${compilation.target.targetName} '" )
121117 kmpResources.publishResourcesAsKotlinComponent(
122118 target,
123- { kmpResourceRoot },
119+ { kotlinSourceSet ->
120+ if (kotlinSourceSet == compilation.defaultSourceSet) {
121+ KotlinTargetResourcesPublication .ResourceRoot (allCompilationResources, emptyList(), emptyList())
122+ } else {
123+ KotlinTargetResourcesPublication .ResourceRoot (emptyDir, emptyList(), emptyList())
124+ }
125+ },
124126 kmpEmptyPath
125127 )
126128
You can’t perform that action at this time.
0 commit comments