Introduce -Xcommon-sources and pass it correctly from build tool plugins

#KT-25196 In Progress
This commit is contained in:
Alexander Udalov
2018-07-27 14:15:12 +02:00
parent d35e73d29b
commit 0f003802fe
28 changed files with 205 additions and 126 deletions
@@ -340,13 +340,16 @@ class IncrementalJvmCompilerRunner(
val compiler = K2JVMCompiler()
val outputDir = args.destinationAsFile
val classpath = args.classpathAsList
val moduleFile = makeModuleFile(args.moduleName!!,
isTest = false,
outputDir = outputDir,
sourcesToCompile = sourcesToCompile,
javaSourceRoots = javaSourceRoots,
classpath = classpath,
friendDirs = listOf())
val moduleFile = makeModuleFile(
args.moduleName!!,
isTest = false,
outputDir = outputDir,
sourcesToCompile = sourcesToCompile,
commonSources = args.commonSources?.map(::File).orEmpty(),
javaSourceRoots = javaSourceRoots,
classpath = classpath,
friendDirs = listOf()
)
val destination = args.destination
args.destination = null
args.buildFile = moduleFile.absolutePath