diff --git a/jps/jps-plugin/jps-plugin.iml b/jps/jps-plugin/jps-plugin.iml
index 1e732f59e2f..83efc10247f 100644
--- a/jps/jps-plugin/jps-plugin.iml
+++ b/jps/jps-plugin/jps-plugin.iml
@@ -4,6 +4,7 @@
+
@@ -12,6 +13,7 @@
+
diff --git a/jps/jps-plugin/kannotator-jps-plugin-test/kannotator-jps-plugin-test.iml b/jps/jps-plugin/kannotator-jps-plugin-test/kannotator-jps-plugin-test.iml
new file mode 100644
index 00000000000..59b1954066a
--- /dev/null
+++ b/jps/jps-plugin/kannotator-jps-plugin-test/kannotator-jps-plugin-test.iml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jps/jps-plugin/kannotator-jps-plugin-test/test/org/jetbrains/jet/jps/build/kannotator/KAnnotatorJpsBuildTestCase.java b/jps/jps-plugin/kannotator-jps-plugin-test/test/org/jetbrains/jet/jps/build/kannotator/KAnnotatorJpsBuildTestCase.java
new file mode 100644
index 00000000000..3950077dc4c
--- /dev/null
+++ b/jps/jps-plugin/kannotator-jps-plugin-test/test/org/jetbrains/jet/jps/build/kannotator/KAnnotatorJpsBuildTestCase.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2010-2012 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jetbrains.jet.jps.build.kannotator;
+
+import com.intellij.openapi.util.io.FileUtil;
+import org.jetbrains.jet.jps.build.AbstractKotlinJpsBuildTestCase;
+import org.jetbrains.jps.builders.BuildResult;
+import org.jetbrains.jps.model.module.JpsModule;
+import org.jetbrains.jps.model.module.JpsModuleSourceRoot;
+
+import java.io.File;
+import java.io.IOException;
+
+public class KAnnotatorJpsBuildTestCase extends AbstractKotlinJpsBuildTestCase {
+ private static final String JDK_NAME = "1.6";
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ File sourceFilesRoot = new File(TEST_DATA_PATH + File.separator + "kannotator");
+ workDir = copyTestDataToTmpDir(sourceFilesRoot);
+ }
+
+ public void testMakeKannotator() {
+ doTest(false);
+ }
+
+ public void testRebuildKannotator() {
+ doTest(true);
+ }
+
+ private void doTest(boolean rebuildBeforeMake) {
+ initProject();
+ rebuildAll();
+ for (JpsModule module : myProject.getModules()) {
+ for (JpsModuleSourceRoot sourceRoot : module.getSourceRoots()) {
+ processFile(sourceRoot.getFile(), rebuildBeforeMake);
+ }
+ }
+ }
+
+ private void processFile(File root, boolean rebuildBeforeMake) {
+ if (root.isDirectory()) {
+ File[] files = root.listFiles();
+ if (files == null) return;
+ for (File file : files) {
+ processFile(file, rebuildBeforeMake);
+ }
+ }
+ else if (root.getName().endsWith(".kt")) {
+ System.out.println("Test started. File: " + root.getName());
+ String path = root.getAbsolutePath();
+ if (rebuildBeforeMake) {
+ rebuildAll();
+ }
+ System.out.println("Change file: " + path);
+ change(path);
+ makeAll().assertSuccessful();
+ System.out.println("Test successfully finished. File: " + root.getName());
+ System.out.println("-----");
+ }
+ }
+
+ @Override
+ protected void rebuildAll() {
+ System.out.println("'Rebuild all' started");
+ super.rebuildAll();
+ System.out.println("'Rebuild all' finished");
+ }
+
+ @Override
+ protected BuildResult makeAll() {
+ System.out.println("'Make all' started");
+ BuildResult result = super.makeAll();
+ System.out.println("'Make all' finished");
+ return result;
+ }
+
+ @Override
+ protected File doGetProjectDir() throws IOException {
+ return workDir;
+ }
+
+ private void initProject() {
+ addJdk(JDK_NAME);
+ loadProject(workDir.getAbsolutePath());
+ addKotlinRuntimeDependency();
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ FileUtil.delete(workDir);
+ super.tearDown();
+ }
+}
diff --git a/jps/jps-plugin/src/org/jetbrains/jet/jps/build/KotlinBuilder.java b/jps/jps-plugin/src/org/jetbrains/jet/jps/build/KotlinBuilder.java
index 7ddf44dedc9..c7471dcbca7 100644
--- a/jps/jps-plugin/src/org/jetbrains/jet/jps/build/KotlinBuilder.java
+++ b/jps/jps-plugin/src/org/jetbrains/jet/jps/build/KotlinBuilder.java
@@ -83,7 +83,7 @@ public class KotlinBuilder extends ModuleLevelBuilder {
File outputDir = representativeTarget.getOutputDir();
- CompilerEnvironment environment = CompilerEnvironment.getEnvironmentFor(PathUtil.getKotlinPathsForJpsPlugin(), outputDir);
+ CompilerEnvironment environment = CompilerEnvironment.getEnvironmentFor(PathUtil.getKotlinPathsForJpsPluginOrJpsTests(), outputDir);
if (!environment.success()) {
environment.reportErrorsTo(messageCollector);
return ExitCode.ABORT;
diff --git a/jps/jps-plugin/test/org/jetbrains/jet/jps/build/AbstractKotlinJpsBuildTestCase.java b/jps/jps-plugin/test/org/jetbrains/jet/jps/build/AbstractKotlinJpsBuildTestCase.java
new file mode 100644
index 00000000000..21ba13e51a1
--- /dev/null
+++ b/jps/jps-plugin/test/org/jetbrains/jet/jps/build/AbstractKotlinJpsBuildTestCase.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2010-2012 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jetbrains.jet.jps.build;
+
+import com.intellij.openapi.util.io.FileUtil;
+import org.jetbrains.jet.utils.PathUtil;
+import org.jetbrains.jps.builders.JpsBuildTestCase;
+import org.jetbrains.jps.model.JpsDummyElement;
+import org.jetbrains.jps.model.JpsModuleRootModificationUtil;
+import org.jetbrains.jps.model.java.JpsAnnotationRootType;
+import org.jetbrains.jps.model.java.JpsJavaDependencyScope;
+import org.jetbrains.jps.model.java.JpsJavaLibraryType;
+import org.jetbrains.jps.model.java.JpsJavaSdkType;
+import org.jetbrains.jps.model.library.JpsLibrary;
+import org.jetbrains.jps.model.library.JpsOrderRootType;
+import org.jetbrains.jps.model.library.JpsTypedLibrary;
+import org.jetbrains.jps.model.library.sdk.JpsSdk;
+import org.jetbrains.jps.model.module.JpsModule;
+import org.jetbrains.jps.util.JpsPathUtil;
+
+import java.io.File;
+import java.io.IOException;
+
+public abstract class AbstractKotlinJpsBuildTestCase extends JpsBuildTestCase {
+ protected static final String TEST_DATA_PATH = "jps-plugin/testData/";
+
+ protected File workDir;
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ System.setProperty("kotlin.jps.tests", "true");
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ System.clearProperty("kotlin.jps.tests");
+ super.tearDown();
+ }
+
+ protected static File copyTestDataToTmpDir(File testDataDir) throws IOException {
+ assert testDataDir.exists() : "Cannot find source folder";
+ File tmpDir = FileUtil.createTempDirectory("jps-build", null);
+ FileUtil.copyDir(testDataDir, tmpDir);
+ return tmpDir;
+ }
+
+ @Override
+ protected File doGetProjectDir() throws IOException {
+ return workDir;
+ }
+
+ @Override
+ protected JpsSdk addJdk(final String name, final String path) {
+ String homePath = System.getProperty("java.home");
+ String versionString = System.getProperty("java.version");
+ JpsTypedLibrary> jdk = myModel.getGlobal().addSdk(name, homePath, versionString, JpsJavaSdkType.INSTANCE);
+ jdk.addRoot(JpsPathUtil.pathToUrl(path), JpsOrderRootType.COMPILED);
+ jdk.addRoot(JpsPathUtil.pathToUrl(PathUtil.getKotlinPathsForDistDirectory().getJdkAnnotationsPath().getAbsolutePath()), JpsAnnotationRootType.INSTANCE);
+ return jdk.getProperties();
+ }
+
+ protected JpsLibrary addKotlinRuntimeDependency() {
+ return addKotlinRuntimeDependency(JpsJavaDependencyScope.COMPILE);
+ }
+
+ protected JpsLibrary addKotlinRuntimeDependency(JpsJavaDependencyScope type) {
+ JpsLibrary library = myProject.addLibrary("kotlin-runtime", JpsJavaLibraryType.INSTANCE);
+ File runtime = PathUtil.getKotlinPathsForDistDirectory().getRuntimePath();
+ library.addRoot(runtime, JpsOrderRootType.COMPILED);
+ for (JpsModule module : myProject.getModules()) {
+ JpsModuleRootModificationUtil.addDependency(module, library, type, false);
+ }
+ return library;
+ }
+}
diff --git a/jps/jps-plugin/test/org/jetbrains/jet/jps/build/KotlinJpsBuildTestCase.java b/jps/jps-plugin/test/org/jetbrains/jet/jps/build/KotlinJpsBuildTestCase.java
new file mode 100644
index 00000000000..cebba67b408
--- /dev/null
+++ b/jps/jps-plugin/test/org/jetbrains/jet/jps/build/KotlinJpsBuildTestCase.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2010-2012 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jetbrains.jet.jps.build;
+
+import com.intellij.openapi.util.io.FileUtil;
+import org.jetbrains.jps.model.java.*;
+
+import java.io.File;
+import java.io.IOException;
+
+public class KotlinJpsBuildTestCase extends AbstractKotlinJpsBuildTestCase {
+ private static final String PROJECT_NAME = "kotlinProject";
+ private static final String JDK_NAME = "IDEA_JDK";
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ File sourceFilesRoot = new File(TEST_DATA_PATH + File.separator + getTestName(true));
+ workDir = copyTestDataToTmpDir(sourceFilesRoot);
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ FileUtil.delete(workDir);
+ super.tearDown();
+ }
+
+ private void initProject() {
+ addJdk(JDK_NAME);
+ loadProject(workDir.getAbsolutePath() + File.separator + PROJECT_NAME + ".ipr");
+ }
+
+ public void doTest() {
+ initProject();
+ makeAll().assertSuccessful();
+ }
+
+ public void testSimpleKotlinProject() {
+ doTest();
+ }
+
+ public void testSimpleKotlinJavaProject() {
+ doTest();
+ }
+
+ public void testJKJProject() {
+ doTest();
+ }
+
+ public void testKJKProject() {
+ doTest();
+ }
+
+ public void testKJCircularProject() {
+ doTest();
+ }
+
+ public void testTwoModules() {
+ doTest();
+ }
+
+ public void testTestOnlyDependency() throws Throwable {
+ initProject();
+ addKotlinRuntimeDependency(JpsJavaDependencyScope.TEST);
+ makeAll().assertSuccessful();
+ change(workDir + "/src/src.kt", "fun foo() { println() }");
+ makeAll().assertFailed();
+ }
+
+}
diff --git a/jps/jps-plugin/testData/JKJProject/kotlinProject.iml b/jps/jps-plugin/testData/JKJProject/kotlinProject.iml
new file mode 100644
index 00000000000..10db71f5cd2
--- /dev/null
+++ b/jps/jps-plugin/testData/JKJProject/kotlinProject.iml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/JKJProject/kotlinProject.ipr b/jps/jps-plugin/testData/JKJProject/kotlinProject.ipr
new file mode 100644
index 00000000000..90747786771
--- /dev/null
+++ b/jps/jps-plugin/testData/JKJProject/kotlinProject.ipr
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/JKJProject/src/java/JFirst.java b/jps/jps-plugin/testData/JKJProject/src/java/JFirst.java
new file mode 100644
index 00000000000..efaf2188e4d
--- /dev/null
+++ b/jps/jps-plugin/testData/JKJProject/src/java/JFirst.java
@@ -0,0 +1,7 @@
+package java;
+
+public class JFirst {
+ public void foo() {
+ new kotlin.KFirst().foo();
+ }
+}
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/JKJProject/src/java/JSecond.java b/jps/jps-plugin/testData/JKJProject/src/java/JSecond.java
new file mode 100644
index 00000000000..8d126964842
--- /dev/null
+++ b/jps/jps-plugin/testData/JKJProject/src/java/JSecond.java
@@ -0,0 +1,7 @@
+package java;
+
+public class JSecond {
+ public void foo() {
+
+ }
+}
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/JKJProject/src/kotlin/KFirst.kt b/jps/jps-plugin/testData/JKJProject/src/kotlin/KFirst.kt
new file mode 100644
index 00000000000..110919f715d
--- /dev/null
+++ b/jps/jps-plugin/testData/JKJProject/src/kotlin/KFirst.kt
@@ -0,0 +1,7 @@
+package kotlin
+
+class KFirst() {
+ fun foo() {
+ java.JSecond().foo()
+ }
+}
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/KJCircularProject/kotlinProject.iml b/jps/jps-plugin/testData/KJCircularProject/kotlinProject.iml
new file mode 100644
index 00000000000..d04ecd6e02e
--- /dev/null
+++ b/jps/jps-plugin/testData/KJCircularProject/kotlinProject.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/KJCircularProject/kotlinProject.ipr b/jps/jps-plugin/testData/KJCircularProject/kotlinProject.ipr
new file mode 100644
index 00000000000..90747786771
--- /dev/null
+++ b/jps/jps-plugin/testData/KJCircularProject/kotlinProject.ipr
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/KJCircularProject/src/java/JFirst.java b/jps/jps-plugin/testData/KJCircularProject/src/java/JFirst.java
new file mode 100644
index 00000000000..686f3641b6c
--- /dev/null
+++ b/jps/jps-plugin/testData/KJCircularProject/src/java/JFirst.java
@@ -0,0 +1,11 @@
+package java;
+
+public class JFirst {
+ public void foo() {
+ new kotlin.KFirst().foo();
+ }
+
+ public void bar() {
+ new kotlin.KFirst().bar();
+ }
+}
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/KJCircularProject/src/kotlin/KFirst.kt b/jps/jps-plugin/testData/KJCircularProject/src/kotlin/KFirst.kt
new file mode 100644
index 00000000000..38a327f0713
--- /dev/null
+++ b/jps/jps-plugin/testData/KJCircularProject/src/kotlin/KFirst.kt
@@ -0,0 +1,9 @@
+package kotlin
+
+class KFirst() {
+ fun foo() {
+ java.JFirst().bar()
+ }
+
+ fun bar() {}
+}
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/KJKProject/kotlinProject.iml b/jps/jps-plugin/testData/KJKProject/kotlinProject.iml
new file mode 100644
index 00000000000..864e89613d7
--- /dev/null
+++ b/jps/jps-plugin/testData/KJKProject/kotlinProject.iml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jps/jps-plugin/testData/KJKProject/kotlinProject.ipr b/jps/jps-plugin/testData/KJKProject/kotlinProject.ipr
new file mode 100644
index 00000000000..90747786771
--- /dev/null
+++ b/jps/jps-plugin/testData/KJKProject/kotlinProject.ipr
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/KJKProject/src/java/JFirst.java b/jps/jps-plugin/testData/KJKProject/src/java/JFirst.java
new file mode 100644
index 00000000000..5423b46e09b
--- /dev/null
+++ b/jps/jps-plugin/testData/KJKProject/src/java/JFirst.java
@@ -0,0 +1,7 @@
+package java;
+
+public class JFirst {
+ public void foo() {
+ new kotlin.KSecond().foo();
+ }
+}
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/KJKProject/src/kotlin/KFirst.kt b/jps/jps-plugin/testData/KJKProject/src/kotlin/KFirst.kt
new file mode 100644
index 00000000000..29600c79f20
--- /dev/null
+++ b/jps/jps-plugin/testData/KJKProject/src/kotlin/KFirst.kt
@@ -0,0 +1,7 @@
+package kotlin
+
+class KFirst() {
+ fun foo() {
+ java.JFirst().foo()
+ }
+}
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/KJKProject/src/kotlin/KSecond.kt b/jps/jps-plugin/testData/KJKProject/src/kotlin/KSecond.kt
new file mode 100644
index 00000000000..56d654aed84
--- /dev/null
+++ b/jps/jps-plugin/testData/KJKProject/src/kotlin/KSecond.kt
@@ -0,0 +1,7 @@
+package kotlin
+
+class KSecond() {
+ fun foo() {
+
+ }
+}
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/simpleKotlinJavaProject/kotlinProject.iml b/jps/jps-plugin/testData/simpleKotlinJavaProject/kotlinProject.iml
new file mode 100644
index 00000000000..d04ecd6e02e
--- /dev/null
+++ b/jps/jps-plugin/testData/simpleKotlinJavaProject/kotlinProject.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/simpleKotlinJavaProject/kotlinProject.ipr b/jps/jps-plugin/testData/simpleKotlinJavaProject/kotlinProject.ipr
new file mode 100644
index 00000000000..90747786771
--- /dev/null
+++ b/jps/jps-plugin/testData/simpleKotlinJavaProject/kotlinProject.ipr
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/simpleKotlinJavaProject/src/Test.java b/jps/jps-plugin/testData/simpleKotlinJavaProject/src/Test.java
new file mode 100644
index 00000000000..1c47016bd6d
--- /dev/null
+++ b/jps/jps-plugin/testData/simpleKotlinJavaProject/src/Test.java
@@ -0,0 +1,6 @@
+import test.*;
+class A {
+ public static void main(String[] args) {
+ new Foo().foo();
+ }
+}
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/simpleKotlinJavaProject/src/kotlinFile.kt b/jps/jps-plugin/testData/simpleKotlinJavaProject/src/kotlinFile.kt
new file mode 100644
index 00000000000..cdf55aa68be
--- /dev/null
+++ b/jps/jps-plugin/testData/simpleKotlinJavaProject/src/kotlinFile.kt
@@ -0,0 +1,7 @@
+package test
+
+class Foo() {
+ fun foo() {
+
+ }
+}
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/simpleKotlinProject/kotlinProject.iml b/jps/jps-plugin/testData/simpleKotlinProject/kotlinProject.iml
new file mode 100644
index 00000000000..a0cbe548242
--- /dev/null
+++ b/jps/jps-plugin/testData/simpleKotlinProject/kotlinProject.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jps/jps-plugin/testData/simpleKotlinProject/kotlinProject.ipr b/jps/jps-plugin/testData/simpleKotlinProject/kotlinProject.ipr
new file mode 100644
index 00000000000..90747786771
--- /dev/null
+++ b/jps/jps-plugin/testData/simpleKotlinProject/kotlinProject.ipr
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/simpleKotlinProject/src/test1.kt b/jps/jps-plugin/testData/simpleKotlinProject/src/test1.kt
new file mode 100644
index 00000000000..a2c4e958bb5
--- /dev/null
+++ b/jps/jps-plugin/testData/simpleKotlinProject/src/test1.kt
@@ -0,0 +1,3 @@
+fun foo() {
+
+}
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/testOnlyDependency/kotlinProject.iml b/jps/jps-plugin/testData/testOnlyDependency/kotlinProject.iml
new file mode 100644
index 00000000000..a441b33e10b
--- /dev/null
+++ b/jps/jps-plugin/testData/testOnlyDependency/kotlinProject.iml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/testOnlyDependency/kotlinProject.ipr b/jps/jps-plugin/testData/testOnlyDependency/kotlinProject.ipr
new file mode 100644
index 00000000000..90747786771
--- /dev/null
+++ b/jps/jps-plugin/testData/testOnlyDependency/kotlinProject.ipr
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/testOnlyDependency/src/src.kt b/jps/jps-plugin/testData/testOnlyDependency/src/src.kt
new file mode 100644
index 00000000000..2d1ad72754c
--- /dev/null
+++ b/jps/jps-plugin/testData/testOnlyDependency/src/src.kt
@@ -0,0 +1 @@
+fun foo() { }
\ No newline at end of file
diff --git a/jps/jps-plugin/testData/testOnlyDependency/test/test.kt b/jps/jps-plugin/testData/testOnlyDependency/test/test.kt
new file mode 100644
index 00000000000..e3cac1c58f9
--- /dev/null
+++ b/jps/jps-plugin/testData/testOnlyDependency/test/test.kt
@@ -0,0 +1,3 @@
+fun test() {
+ println("a")
+}
\ No newline at end of file