diff --git a/build-common/build.gradle.kts b/build-common/build.gradle.kts index 5f192a0b582..6dffd8737ad 100644 --- a/build-common/build.gradle.kts +++ b/build-common/build.gradle.kts @@ -10,15 +10,16 @@ dependencies { compileOnly(project(":compiler:frontend.java")) compileOnly(project(":js:js.serializer")) compileOnly(project(":js:js.frontend")) + compileOnly(project(":kotlin-reflect-api")) compileOnly(ideaSdkDeps("util")) testCompileOnly(project(":compiler:cli-common")) testCompile(projectTests(":compiler:tests-common")) testCompile(commonDep("junit:junit")) testCompile(protobufFull()) testCompile(projectDist(":kotlin-stdlib")) - testCompile(projectDist(":kotlin-reflect")) testCompileOnly(ideaSdkDeps("openapi")) testRuntime(projectDist(":kotlin-compiler")) + testRuntime(projectDist(":kotlin-reflect")) } sourceSets { diff --git a/compiler/build.gradle.kts b/compiler/build.gradle.kts index a55c3b01a27..e7a15f33434 100644 --- a/compiler/build.gradle.kts +++ b/compiler/build.gradle.kts @@ -12,8 +12,8 @@ val otherCompilerModules = compilerModules.filter { it != path } val depDistProjects = listOf( ":kotlin-script-runtime", ":kotlin-stdlib", - ":kotlin-reflect", - ":kotlin-test:kotlin-test-jvm") + ":kotlin-test:kotlin-test-jvm" +) // TODO: it seems incomplete, find and add missing dependencies val testDistProjects = listOf( @@ -33,7 +33,8 @@ val testDistProjects = listOf( ":plugins:android-extensions-compiler", ":kotlin-ant", ":kotlin-annotations-jvm", - ":kotlin-annotations-android") + ":kotlin-annotations-android" +) val testJvm6ServerRuntime by configurations.creating @@ -49,11 +50,13 @@ dependencies { testCompile(project(":compiler:ir.ir2cfg")) testCompile(project(":compiler:ir.tree")) // used for deepCopyWithSymbols call that is removed by proguard from the compiler TODO: make it more straightforward testCompileOnly(project(":kotlin-daemon-client")) + testCompileOnly(project(":kotlin-reflect-api")) otherCompilerModules.forEach { testCompileOnly(project(it)) } testCompile(ideaSdkDeps("openapi", "idea", "util", "asm-all", "commons-httpclient-3.1-patched")) + testRuntime(projectDist(":kotlin-reflect")) testRuntime(projectDist(":kotlin-compiler")) testRuntime(projectDist(":kotlin-daemon-client")) testRuntime(preloadedDeps("dx", subdir = "android-5.0/lib")) diff --git a/compiler/cli/cli-common/build.gradle.kts b/compiler/cli/cli-common/build.gradle.kts index 2190bfd7e39..05b1ef79389 100644 --- a/compiler/cli/cli-common/build.gradle.kts +++ b/compiler/cli/cli-common/build.gradle.kts @@ -8,6 +8,7 @@ dependencies { compile(project(":compiler:frontend")) compile(project(":compiler:frontend.java")) compile(project(":compiler:frontend.script")) + compileOnly(project(":kotlin-reflect-api")) compile(ideaSdkCoreDeps(*(rootProject.extra["ideaCoreSdkJars"] as Array))) } @@ -15,4 +16,3 @@ sourceSets { "main" { projectDefault() } "test" {} } - diff --git a/compiler/daemon/daemon-client/build.gradle.kts b/compiler/daemon/daemon-client/build.gradle.kts index f85e0a3aa56..16af21748ba 100644 --- a/compiler/daemon/daemon-client/build.gradle.kts +++ b/compiler/daemon/daemon-client/build.gradle.kts @@ -11,6 +11,7 @@ dependencies { compileOnly(project(":compiler:util")) compileOnly(project(":compiler:cli-common")) compileOnly(project(":compiler:daemon-common")) + compileOnly(project(":kotlin-reflect-api")) compileOnly(nativePlatformUberjar) } diff --git a/compiler/frontend.script/build.gradle.kts b/compiler/frontend.script/build.gradle.kts index 41f7a700611..7bbb79981b4 100644 --- a/compiler/frontend.script/build.gradle.kts +++ b/compiler/frontend.script/build.gradle.kts @@ -7,7 +7,7 @@ dependencies { compile(project(":compiler:util")) compile(project(":compiler:frontend")) compile(projectDist(":kotlin-stdlib")) - compile(projectDist(":kotlin-reflect")) + compileOnly(project(":kotlin-reflect-api")) compile(preloadedDeps("kotlinx-coroutines-core")) } diff --git a/compiler/tests-common/build.gradle.kts b/compiler/tests-common/build.gradle.kts index 2247761f9b1..e00bf7d6720 100644 --- a/compiler/tests-common/build.gradle.kts +++ b/compiler/tests-common/build.gradle.kts @@ -23,6 +23,7 @@ dependencies { testCompileOnly(project(":plugins:android-extensions-compiler")) testCompile(project(":kotlin-test:kotlin-test-jvm")) testCompile(projectTests(":compiler:tests-common-jvm6")) + testCompileOnly(project(":kotlin-reflect-api")) testCompile(commonDep("junit:junit")) testCompile(ideaSdkCoreDeps("intellij-core")) testCompile(ideaSdkDeps("openapi", "idea", "idea_rt")) diff --git a/compiler/tests-java8/build.gradle.kts b/compiler/tests-java8/build.gradle.kts index 48765e63997..d6d076d3e15 100644 --- a/compiler/tests-java8/build.gradle.kts +++ b/compiler/tests-java8/build.gradle.kts @@ -5,6 +5,7 @@ apply { plugin("kotlin") } dependencies { testCompile(projectTests(":compiler:tests-common")) testCompile(projectTests(":generators:test-generator")) + testRuntime(projectDist(":kotlin-reflect")) } sourceSets { diff --git a/eval4j/build.gradle.kts b/eval4j/build.gradle.kts index 15d4a181c23..b78ea14fc42 100644 --- a/eval4j/build.gradle.kts +++ b/eval4j/build.gradle.kts @@ -3,7 +3,6 @@ apply { plugin("kotlin") } dependencies { compile(projectDist(":kotlin-stdlib")) - compile(projectDist(":kotlin-reflect")) compile(project(":compiler:backend")) compile(ideaSdkDeps("asm-all")) // compile(files(PathUtil.getJdkClassesRootsFromCurrentJre())) // TODO: make this one work instead of the nex one, since it contains more universal logic diff --git a/generators/build.gradle.kts b/generators/build.gradle.kts index 08d9fe92fe0..78584b28bfb 100644 --- a/generators/build.gradle.kts +++ b/generators/build.gradle.kts @@ -32,10 +32,12 @@ dependencies { compile(projectTests(":js:js.tests")) compile(projectTests(":generators:test-generator")) compile(ideaSdkDeps("jps-build-test", subdir = "jps/test")) + compileOnly(project(":kotlin-reflect-api")) testCompile(project(":idea:idea-test-framework")) { isTransitive = false } testCompile(project(":compiler:incremental-compilation-impl")) testCompile(commonDep("junit:junit")) testCompile(ideaSdkDeps("openapi", "idea")) + testRuntime(projectDist(":kotlin-reflect")) testRuntime(ideaSdkDeps("*.jar")) testRuntime(ideaPluginDeps("idea-junit", "resources_en", plugin = "junit")) testRuntime(ideaPluginDeps("IntelliLang", plugin = "IntelliLang")) diff --git a/idea/build.gradle.kts b/idea/build.gradle.kts index 85952ef0327..da70251cf47 100644 --- a/idea/build.gradle.kts +++ b/idea/build.gradle.kts @@ -1,10 +1,12 @@ + import org.gradle.jvm.tasks.Jar apply { plugin("kotlin") } dependencies { compile(project(":kotlin-stdlib")) + compileOnly(project(":kotlin-reflect-api")) compile(project(":core:descriptors")) compile(project(":core:descriptors.jvm")) compile(project(":compiler:backend")) @@ -67,6 +69,7 @@ dependencies { testRuntime(ideaPluginDeps("*.jar", plugin = "testng")) testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false } + testRuntime(projectDist(":kotlin-reflect")) testRuntime(projectDist(":kotlin-preloader")) // deps below are test runtime deps, but made test compile to split compilation and running to reduce mem req diff --git a/idea/idea-android/build.gradle.kts b/idea/idea-android/build.gradle.kts index daf76e81c6b..8d61efc732d 100644 --- a/idea/idea-android/build.gradle.kts +++ b/idea/idea-android/build.gradle.kts @@ -2,7 +2,7 @@ apply { plugin("kotlin") } dependencies { - compile(projectDist(":kotlin-reflect")) + compileOnly(project(":kotlin-reflect-api")) compile(project(":compiler:util")) compile(project(":compiler:light-classes")) compile(project(":compiler:frontend")) @@ -28,6 +28,7 @@ dependencies { testCompile(ideaSdkDeps("gson")) testCompile(commonDep("junit:junit")) + testRuntime(projectDist(":kotlin-reflect")) testRuntime(projectDist(":kotlin-compiler")) testRuntime(project(":plugins:android-extensions-ide")) testRuntime(project(":plugins:kapt3-idea")) diff --git a/idea/idea-core/build.gradle.kts b/idea/idea-core/build.gradle.kts index 55baf283e9c..7198d1256f0 100644 --- a/idea/idea-core/build.gradle.kts +++ b/idea/idea-core/build.gradle.kts @@ -2,6 +2,7 @@ apply { plugin("kotlin") } dependencies { compile(projectDist(":kotlin-stdlib")) + compileOnly(project(":kotlin-reflect-api")) compile(project(":core:descriptors")) compile(project(":core:descriptors.jvm")) compile(project(":compiler:frontend")) diff --git a/idea/idea-gradle/build.gradle.kts b/idea/idea-gradle/build.gradle.kts index de791c1763f..18f577ab8a4 100644 --- a/idea/idea-gradle/build.gradle.kts +++ b/idea/idea-gradle/build.gradle.kts @@ -22,6 +22,7 @@ dependencies { testCompile(ideaPluginDeps("Groovy", plugin = "Groovy")) testCompileOnly(ideaSdkDeps("groovy-all", "idea_rt")) + testRuntime(projectDist(":kotlin-reflect")) testRuntime(project(":idea:idea-jvm")) testRuntime(project(":idea:idea-android")) testRuntime(project(":plugins:kapt3-idea")) diff --git a/idea/idea-jps-common/build.gradle.kts b/idea/idea-jps-common/build.gradle.kts index bb73a4bdde6..439d7e17ff3 100644 --- a/idea/idea-jps-common/build.gradle.kts +++ b/idea/idea-jps-common/build.gradle.kts @@ -3,6 +3,7 @@ apply { plugin("kotlin") } dependencies { compile(projectDist(":kotlin-stdlib")) + compileOnly(project(":kotlin-reflect-api")) compile(project(":compiler:util")) compile(project(":compiler:cli-common")) compile(project(":compiler:frontend.java")) diff --git a/idea/idea-maven/build.gradle.kts b/idea/idea-maven/build.gradle.kts index 3a78556ffb0..46abf476c05 100644 --- a/idea/idea-maven/build.gradle.kts +++ b/idea/idea-maven/build.gradle.kts @@ -23,6 +23,7 @@ dependencies { testCompileOnly(ideaSdkDeps("openapi", "idea", "gson", "idea_rt")) testCompileOnly(ideaPluginDeps("maven", "maven-server-api", plugin = "maven")) + testRuntime(projectDist(":kotlin-reflect")) testRuntime(project(":idea:idea-jvm")) testRuntime(project(":idea:idea-android")) testRuntime(project(":plugins:android-extensions-ide")) diff --git a/idea/idea-test-framework/build.gradle.kts b/idea/idea-test-framework/build.gradle.kts index f1dd44bf766..2ee0a3d4c70 100644 --- a/idea/idea-test-framework/build.gradle.kts +++ b/idea/idea-test-framework/build.gradle.kts @@ -9,6 +9,7 @@ dependencies { compile(project(":idea:idea-core")) compile(project(":idea:idea-jps-common")) compile(project(":kotlin-test:kotlin-test-jvm")) + compileOnly(project(":kotlin-reflect-api")) compile(commonDep("junit:junit")) compile(ideaSdkDeps("openapi", "idea")) } diff --git a/jps-plugin/build.gradle.kts b/jps-plugin/build.gradle.kts index 39c5940de3e..f93fb866aa3 100644 --- a/jps-plugin/build.gradle.kts +++ b/jps-plugin/build.gradle.kts @@ -13,6 +13,7 @@ dependencies { compile(projectRuntimeJar(":kotlin-preloader")) compile(project(":idea:idea-jps-common")) compile(ideaSdkDeps("jps-builders", "jps-builders-6", subdir = "jps")) + testCompileOnly(project(":kotlin-reflect-api")) testCompile(project(":compiler:incremental-compilation-impl")) testCompile(projectTests(":compiler:tests-common")) testCompile(projectTests(":compiler:incremental-compilation-impl")) @@ -24,6 +25,7 @@ dependencies { compilerModules.forEach { testRuntime(project(it)) } + testRuntime(projectDist(":kotlin-reflect")) testRuntime(ideaSdkCoreDeps("*.jar")) testRuntime(ideaSdkDeps("*.jar")) testRuntime(ideaSdkDeps("*.jar", subdir = "jps/test")) diff --git a/plugins/android-extensions/android-extensions-idea/build.gradle.kts b/plugins/android-extensions/android-extensions-idea/build.gradle.kts index 0559eddd061..fd4f8704871 100644 --- a/plugins/android-extensions/android-extensions-idea/build.gradle.kts +++ b/plugins/android-extensions/android-extensions-idea/build.gradle.kts @@ -21,6 +21,7 @@ dependencies { testCompile(projectTests(":idea:idea-android")) testCompile(projectDist(":kotlin-test:kotlin-test-jvm")) testCompile(commonDep("junit:junit")) + testRuntime(projectDist(":kotlin-reflect")) testRuntime(project(":idea:idea-jvm")) testRuntime(project(":plugins:android-extensions-jps")) testRuntime(project(":sam-with-receiver-ide-plugin")) diff --git a/plugins/plugins-tests/build.gradle.kts b/plugins/plugins-tests/build.gradle.kts index 203aba48be6..413c18f9094 100644 --- a/plugins/plugins-tests/build.gradle.kts +++ b/plugins/plugins-tests/build.gradle.kts @@ -25,6 +25,7 @@ dependencies { testCompileOnly(ideaSdkDeps("jps-builders")) testCompile(ideaSdkDeps("jps-build-test", subdir = "jps/test")) testCompile(ideaPluginDeps("*.jar", plugin = "android", subdir = "lib/jps")) + testRuntime(projectDist(":kotlin-reflect")) testRuntime(project(":jps-plugin")) testRuntime(projectTests(":compiler:tests-common-jvm6")) testRuntime(ideaSdkDeps("*.jar")) diff --git a/plugins/source-sections/source-sections-compiler/build.gradle.kts b/plugins/source-sections/source-sections-compiler/build.gradle.kts index f042caf56e6..8da0233579d 100644 --- a/plugins/source-sections/source-sections-compiler/build.gradle.kts +++ b/plugins/source-sections/source-sections-compiler/build.gradle.kts @@ -19,6 +19,7 @@ dependencies { testCompile(projectTests(":compiler:tests-common")) testCompile(ideaSdkDeps("idea", "idea_rt", "openapi")) testCompile(commonDep("junit:junit")) + testRuntime(projectDist(":kotlin-reflect")) } sourceSets { diff --git a/plugins/uast-kotlin/build.gradle.kts b/plugins/uast-kotlin/build.gradle.kts index c2003884b50..ec3f59e3be3 100644 --- a/plugins/uast-kotlin/build.gradle.kts +++ b/plugins/uast-kotlin/build.gradle.kts @@ -16,6 +16,7 @@ dependencies { testCompile(project(":compiler:cli")) testCompile(project(":idea:idea-test-framework")) testCompileOnly(ideaSdkDeps("idea_rt")) + testRuntime(projectDist(":kotlin-reflect")) testRuntime(ideaSdkDeps("*.jar")) testRuntime(ideaPluginDeps("*.jar", plugin = "junit")) testRuntime(ideaPluginDeps("*.jar", plugin = "gradle")) diff --git a/ultimate/build.gradle.kts b/ultimate/build.gradle.kts index 74e6fc48c91..9e4190a59a3 100644 --- a/ultimate/build.gradle.kts +++ b/ultimate/build.gradle.kts @@ -21,7 +21,7 @@ val ideaProjectResources = project(":idea").the().sourceS evaluationDependsOn(":prepare:idea-plugin") dependencies { - compile(projectDist(":kotlin-reflect")) + compileOnly(project(":kotlin-reflect-api")) compile(projectDist(":kotlin-stdlib")) compile(project(":core:descriptors")) { isTransitive = false } compile(project(":core:descriptors.jvm")) { isTransitive = false } @@ -65,6 +65,7 @@ dependencies { testCompile(ideaUltimateSdkDeps("gson")) testCompile(preloadedDeps("kotlinx-coroutines-core")) + testRuntime(projectDist(":kotlin-reflect")) testRuntime(projectDist(":kotlin-script-runtime")) testRuntime(projectRuntimeJar(":kotlin-compiler")) testRuntime(project(":plugins:android-extensions-ide")) { isTransitive = false }