JPS: support -Xcommon-sources for multiplatform projects
#KT-26489 Fixed
This commit is contained in:
@@ -150,8 +150,11 @@ class KotlinJvmModuleBuildTarget(kotlinContext: KotlinCompileContext, jpsModuleB
|
||||
val outputDir = target.outputDir
|
||||
val friendDirs = target.friendOutputDirs
|
||||
|
||||
val moduleSources = collectSourcesToCompile(target, dirtyFilesHolder)
|
||||
val commonSources = emptyList<File>() // TODO: pass common sources here
|
||||
val moduleSources = collectSourcesToCompile(target, dirtyFilesHolder).toSet()
|
||||
val commonSources = sources
|
||||
.filter { it.value.isIncludedSourceRoot && it.key in moduleSources }
|
||||
.map { it.key }
|
||||
|
||||
val hasDirtyOrRemovedSources = checkShouldCompileAndLog(target, dirtyFilesHolder, moduleSources)
|
||||
if (hasDirtyOrRemovedSources) hasDirtySources = true
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ abstract class KotlinModuleBuildTarget<BuildMetaInfoType : BuildMetaInfo> intern
|
||||
}
|
||||
|
||||
/**
|
||||
* @property isIncludedSourceRoot for reporting errors during cross-compilation common module sources
|
||||
* @property isIncludedSourceRoot sources that are cross-compiled to multiple targets
|
||||
*/
|
||||
class Source(
|
||||
val file: File,
|
||||
|
||||
Reference in New Issue
Block a user