JPS: exclude source roots from other targets
Previously `findJavaRootDescriptor` was return source root for random module. This cause build errors for mpp (same file may appear in multiple source roots of common and platform modules) #KT-28988 Fixed
This commit is contained in:
+18
@@ -594,6 +594,11 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
|
||||
runTest("jps-plugin/testData/incremental/multiModule/multiplatform/custom/commonSourcesCompilerArg/");
|
||||
}
|
||||
|
||||
@TestMetadata("complementaryFiles")
|
||||
public void testComplementaryFiles() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/multiModule/multiplatform/custom/complementaryFiles/");
|
||||
}
|
||||
|
||||
@TestMetadata("notSameCompiler")
|
||||
public void testNotSameCompiler() throws Exception {
|
||||
runTest("jps-plugin/testData/incremental/multiModule/multiplatform/custom/notSameCompiler/");
|
||||
@@ -638,6 +643,19 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("jps-plugin/testData/incremental/multiModule/multiplatform/custom/complementaryFiles")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ComplementaryFiles extends AbstractIncrementalJpsTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInComplementaryFiles() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/multiplatform/custom/complementaryFiles"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("jps-plugin/testData/incremental/multiModule/multiplatform/custom/notSameCompiler")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user