diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt index b582978271b..13a812223e1 100644 --- a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/AbstractLookupTrackerTest.kt @@ -17,7 +17,6 @@ package org.jetbrains.kotlin.jps.build import com.intellij.testFramework.UsefulTestCase -import com.intellij.util.containers.HashMap import com.intellij.util.containers.StringInterner import org.jetbrains.kotlin.TestWithWorkingDir import org.jetbrains.kotlin.build.JvmSourceRoot @@ -78,13 +77,14 @@ abstract class AbstractJvmLookupTrackerTest : AbstractLookupTrackerTest() { override fun runCompiler(filesToCompile: Iterable, env: JpsCompilerEnvironment): Any? { val moduleFile = makeModuleFile( - name = "test", - isTest = true, - outputDir = outDir, - sourcesToCompile = filesToCompile.toList(), - javaSourceRoots = listOf(JvmSourceRoot(srcDir, null)), - classpath = listOf(outDir, ForTestCompileRuntime.runtimeJarForTests()).filter { it.exists() }, - friendDirs = emptyList() + name = "test", + isTest = true, + outputDir = outDir, + sourcesToCompile = filesToCompile.toList(), + commonSources = emptyList(), + javaSourceRoots = listOf(JvmSourceRoot(srcDir, null)), + classpath = listOf(outDir, ForTestCompileRuntime.runtimeJarForTests()).filter { it.exists() }, + friendDirs = emptyList() ) val args = K2JVMCompilerArguments().apply { diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jvm/compiler/ClasspathOrderTest.kt b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jvm/compiler/ClasspathOrderTest.kt index 5a67cbce68f..62ad269e3c1 100644 --- a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jvm/compiler/ClasspathOrderTest.kt +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jvm/compiler/ClasspathOrderTest.kt @@ -41,16 +41,17 @@ class ClasspathOrderTest : TestCaseWithTmpdir() { fun testClasspathOrderForModuleScriptBuild() { val xmlContent = KotlinModuleXmlBuilder().addModule( - "name", - File(tmpdir, "output").absolutePath, - listOf(sourceDir), - listOf(JvmSourceRoot(sourceDir)), - listOf(PathUtil.kotlinPathsForDistDirectory.stdlibPath), - null, - JavaModuleBuildTargetType.PRODUCTION.typeId, - JavaModuleBuildTargetType.PRODUCTION.isTests, - setOf(), - emptyList() + "name", + File(tmpdir, "output").absolutePath, + listOf(sourceDir), + listOf(JvmSourceRoot(sourceDir)), + listOf(PathUtil.kotlinPathsForDistDirectory.stdlibPath), + emptyList(), + null, + JavaModuleBuildTargetType.PRODUCTION.typeId, + JavaModuleBuildTargetType.PRODUCTION.isTests, + setOf(), + emptyList() ).asText().toString() val xml = File(tmpdir, "module.xml") diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/modules/KotlinModuleXmlGeneratorTest.java b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/modules/KotlinModuleXmlGeneratorTest.java index 7aa57449b70..ede464de4dc 100644 --- a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/modules/KotlinModuleXmlGeneratorTest.java +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/modules/KotlinModuleXmlGeneratorTest.java @@ -33,6 +33,7 @@ public class KotlinModuleXmlGeneratorTest extends TestCase { Arrays.asList(new File("s1"), new File("s2")), Collections.singletonList(new JvmSourceRoot(new File("java"), null)), Arrays.asList(new File("cp1"), new File("cp2")), + Collections.emptyList(), null, JavaModuleBuildTargetType.PRODUCTION.getTypeId(), JavaModuleBuildTargetType.PRODUCTION.isTests(), @@ -49,6 +50,7 @@ public class KotlinModuleXmlGeneratorTest extends TestCase { Arrays.asList(new File("s1"), new File("s2")), Collections.emptyList(), Arrays.asList(new File("cp1"), new File("cp2")), + Collections.emptyList(), null, JavaModuleBuildTargetType.PRODUCTION.getTypeId(), JavaModuleBuildTargetType.PRODUCTION.isTests(), @@ -66,6 +68,7 @@ public class KotlinModuleXmlGeneratorTest extends TestCase { Arrays.asList(new File("s1"), new File("s2")), Collections.emptyList(), Arrays.asList(new File("cp1"), new File("cp2")), + Collections.emptyList(), null, JavaModuleBuildTargetType.PRODUCTION.getTypeId(), JavaModuleBuildTargetType.PRODUCTION.isTests(), @@ -78,6 +81,7 @@ public class KotlinModuleXmlGeneratorTest extends TestCase { Arrays.asList(new File("s12"), new File("s22")), Collections.emptyList(), Arrays.asList(new File("cp12"), new File("cp22")), + Collections.emptyList(), null, JavaModuleBuildTargetType.TEST.getTypeId(), JavaModuleBuildTargetType.TEST.isTests(), @@ -95,6 +99,7 @@ public class KotlinModuleXmlGeneratorTest extends TestCase { Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), + Collections.emptyList(), new File("/path/to/modular/jdk"), JavaModuleBuildTargetType.PRODUCTION.getTypeId(), JavaModuleBuildTargetType.PRODUCTION.isTests(), diff --git a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/platforms/KotlinJvmModuleBuildTarget.kt b/jps/jps-plugin/src/org/jetbrains/kotlin/jps/platforms/KotlinJvmModuleBuildTarget.kt index 6f1aa6660ae..2d9a2958163 100644 --- a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/platforms/KotlinJvmModuleBuildTarget.kt +++ b/jps/jps-plugin/src/org/jetbrains/kotlin/jps/platforms/KotlinJvmModuleBuildTarget.kt @@ -150,6 +150,7 @@ class KotlinJvmModuleBuildTarget(compileContext: CompileContext, jpsModuleBuildT val friendDirs = target.friendOutputDirs val moduleSources = collectSourcesToCompile(target, dirtyFilesHolder) + val commonSources = emptyList() // TODO: pass common sources here val hasDirtyOrRemovedSources = checkShouldCompileAndLog(target, dirtyFilesHolder, moduleSources) if (hasDirtyOrRemovedSources) hasDirtySources = true @@ -160,6 +161,7 @@ class KotlinJvmModuleBuildTarget(compileContext: CompileContext, jpsModuleBuildT moduleSources, target.findSourceRoots(context), target.findClassPathRoots(), + commonSources, target.findModularJdkRoot(), kotlinModuleId.type, isTests,