diff --git a/compiler/build.gradle.kts b/compiler/build.gradle.kts index 4b5bc66609b..bf5c8bb5fbf 100644 --- a/compiler/build.gradle.kts +++ b/compiler/build.gradle.kts @@ -74,6 +74,11 @@ dependencies { antLauncherJar(commonDep("org.apache.ant", "ant")) antLauncherJar(files(toolsJar())) + + // For JPS build + if (System.getProperty("idea.active") != null) { + testRuntimeOnly(files("${rootProject.projectDir}/dist/kotlinc/lib/kotlin-reflect.jar")) + } } sourceSets { diff --git a/idea/build.gradle.kts b/idea/build.gradle.kts index e43ac95e229..413b5ea9faf 100644 --- a/idea/build.gradle.kts +++ b/idea/build.gradle.kts @@ -56,6 +56,7 @@ dependencies { compileOnly(intellijPluginDep("properties")) compileOnly(intellijPluginDep("java-i18n")) + testCompileOnly(project(":kotlin-reflect-api")) // TODO: fix import (workaround for jps build) testCompile(project(":kotlin-test:kotlin-test-junit")) testCompile(projectTests(":compiler:tests-common")) testCompile(projectTests(":idea:idea-test-framework")) { isTransitive = false } @@ -77,6 +78,7 @@ dependencies { testCompile(project(":kotlin-sam-with-receiver-compiler-plugin")) { isTransitive = false } testRuntime(project(":plugins:android-extensions-compiler")) + testRuntimeOnly(project(":kotlin-android-extensions-runtime")) // TODO: fix import (workaround for jps build) testRuntime(project(":plugins:android-extensions-ide")) { isTransitive = false } testRuntime(project(":allopen-ide-plugin")) { isTransitive = false } testRuntime(project(":kotlin-allopen-compiler-plugin")) @@ -118,8 +120,9 @@ dependencies { testRuntime(intellijPluginDep("android")) testRuntime(intellijPluginDep("smali")) testRuntime(intellijPluginDep("testng")) -} + if (System.getProperty("idea.active") != null) testRuntimeOnly(files("${rootProject.projectDir}/dist/kotlinc/lib/kotlin-reflect.jar")) +} sourceSets { "main" { projectDefault() @@ -144,6 +147,7 @@ sourceSets { } + val performanceTestCompile by configurations.creating { extendsFrom(configurations["testCompile"]) } diff --git a/libraries/examples/kotlin-jsr223-daemon-local-eval-example/build.gradle.kts b/libraries/examples/kotlin-jsr223-daemon-local-eval-example/build.gradle.kts index 01998cdbde0..fde186ea102 100644 --- a/libraries/examples/kotlin-jsr223-daemon-local-eval-example/build.gradle.kts +++ b/libraries/examples/kotlin-jsr223-daemon-local-eval-example/build.gradle.kts @@ -20,6 +20,9 @@ dependencies { compilerClasspath(project(":kotlin-reflect")) compilerClasspath(project(":kotlin-stdlib")) compilerClasspath(project(":kotlin-script-runtime")) + compileOnly(project(":compiler:cli-common")) // TODO: fix import (workaround for jps build) + testCompile(project(":core:util.runtime")) // TODO: fix import (workaround for jps build) + testCompile(project(":compiler:daemon-common")) // TODO: fix import (workaround for jps build) } projectTest { diff --git a/libraries/examples/kotlin-jsr223-local-example/build.gradle.kts b/libraries/examples/kotlin-jsr223-local-example/build.gradle.kts index f1d3ebf3af7..d60bde2b2c7 100644 --- a/libraries/examples/kotlin-jsr223-local-example/build.gradle.kts +++ b/libraries/examples/kotlin-jsr223-local-example/build.gradle.kts @@ -13,6 +13,9 @@ dependencies { testCompile(project(":kotlin-test:kotlin-test-junit")) testCompile(commonDep("junit:junit")) testRuntime(project(":kotlin-reflect")) + compileOnly(project(":compiler:cli-common")) // TODO: fix import (workaround for jps build) + testCompile(project(":core:util.runtime")) // TODO: fix import (workaround for jps build) + testCompile(project(":compiler:daemon-common")) // TODO: fix import (workaround for jps build) } projectTest() diff --git a/libraries/scripting/jvm-host/build.gradle.kts b/libraries/scripting/jvm-host/build.gradle.kts index 2076fe482f7..9cf3bb4bbfd 100644 --- a/libraries/scripting/jvm-host/build.gradle.kts +++ b/libraries/scripting/jvm-host/build.gradle.kts @@ -19,7 +19,7 @@ dependencies { runtime(project(":kotlin-reflect")) testCompile(projectTests(":compiler:tests-common")) testCompile(commonDep("junit")) - testRuntime(project(":kotlin-reflect")) + testCompile(project(":compiler:daemon-common")) // TODO: fix import (workaround for jps build) } sourceSets { diff --git a/plugins/pill/generate-all-tests/build.gradle.kts b/plugins/pill/generate-all-tests/build.gradle.kts index c27e8ec0eb5..c4b9ad1ef0a 100644 --- a/plugins/pill/generate-all-tests/build.gradle.kts +++ b/plugins/pill/generate-all-tests/build.gradle.kts @@ -13,6 +13,8 @@ dependencies { testCompile(projectTests(it)) jpsTest(project(it, configuration = "jpsTest")) } + + testRuntimeOnly(files("${rootProject.projectDir}/dist/kotlinc/lib/kotlin-reflect.jar")) } sourceSets {