From 23fd0a6ec99a4a632a485064a0fa12363fa09d16 Mon Sep 17 00:00:00 2001 From: Leonid Startsev Date: Mon, 10 Sep 2018 17:53:12 +0300 Subject: [PATCH] Split IDE part from kotlinx-serialization-compiler-plugin --- idea/build.gradle.kts | 3 +- idea/build.gradle.kts.173 | 3 +- idea/build.gradle.kts.as31 | 3 +- idea/build.gradle.kts.as32 | 3 +- idea/build.gradle.kts.as33 | 3 +- idea/idea-android/build.gradle.kts | 2 +- idea/idea-android/build.gradle.kts.173 | 2 +- idea/idea-android/build.gradle.kts.as31 | 2 +- idea/idea-android/build.gradle.kts.as32 | 2 +- idea/idea-android/build.gradle.kts.as33 | 2 +- idea/idea-gradle/build.gradle.kts | 2 +- idea/idea-gradle/build.gradle.kts.173 | 2 +- idea/idea-gradle/build.gradle.kts.as31 | 2 +- idea/idea-gradle/build.gradle.kts.as32 | 2 +- idea/idea-gradle/build.gradle.kts.as33 | 2 +- idea/idea-maven/build.gradle.kts | 2 +- idea/idea-maven/build.gradle.kts.173 | 2 +- idea/idea-maven/build.gradle.kts.as31 | 2 +- idea/idea-maven/build.gradle.kts.as32 | 2 +- idea/idea-maven/build.gradle.kts.as33 | 2 +- j2k/build.gradle.kts | 2 +- j2k/build.gradle.kts.173 | 2 +- j2k/build.gradle.kts.as31 | 2 +- j2k/build.gradle.kts.as32 | 2 +- j2k/build.gradle.kts.as33 | 2 +- .../android-extensions-idea/build.gradle.kts | 2 +- .../build.gradle.kts.173 | 2 +- .../build.gradle.kts.as31 | 2 +- .../build.gradle.kts.as32 | 2 +- .../build.gradle.kts.as33 | 2 +- .../build.gradle.kts | 25 ++++------ ...s.build.KotlinJpsCompilerArgumentsProvider | 17 ------- .../jps/KotlinSerializationJpsPlugin.kt | 46 ------------------- .../kotlin-serialization-ide/build.gradle.kts | 29 ++++++++++++ .../KotlinSerializationGradleImportHandler.kt | 0 .../idea/KotlinSerializationImportHandler.kt | 0 .../KotlinSerializationMavenImportHandler.kt | 0 ...linSerializationMavenImportHandler.kt.as31 | 0 ...linSerializationMavenImportHandler.kt.as32 | 0 ...linSerializationMavenImportHandler.kt.as33 | 0 plugins/uast-kotlin/build.gradle.kts | 2 +- plugins/uast-kotlin/build.gradle.kts.173 | 2 +- settings.gradle | 2 + ultimate/build.gradle.kts | 1 + ultimate/build.gradle.kts.173 | 1 + ultimate/build.gradle.kts.as31 | 1 + ultimate/build.gradle.kts.as32 | 1 + 47 files changed, 81 insertions(+), 111 deletions(-) delete mode 100644 plugins/kotlin-serialization/kotlin-serialization-compiler/src/META-INF/services/org.jetbrains.kotlin.jps.build.KotlinJpsCompilerArgumentsProvider delete mode 100644 plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/jps/KotlinSerializationJpsPlugin.kt create mode 100644 plugins/kotlin-serialization/kotlin-serialization-ide/build.gradle.kts rename plugins/kotlin-serialization/{kotlin-serialization-compiler => kotlin-serialization-ide}/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationGradleImportHandler.kt (100%) rename plugins/kotlin-serialization/{kotlin-serialization-compiler => kotlin-serialization-ide}/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationImportHandler.kt (100%) rename plugins/kotlin-serialization/{kotlin-serialization-compiler => kotlin-serialization-ide}/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt (100%) rename plugins/kotlin-serialization/{kotlin-serialization-compiler => kotlin-serialization-ide}/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt.as31 (100%) rename plugins/kotlin-serialization/{kotlin-serialization-compiler => kotlin-serialization-ide}/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt.as32 (100%) rename plugins/kotlin-serialization/{kotlin-serialization-compiler => kotlin-serialization-ide}/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt.as33 (100%) diff --git a/idea/build.gradle.kts b/idea/build.gradle.kts index 9b869379fa6..8c962e14e3e 100644 --- a/idea/build.gradle.kts +++ b/idea/build.gradle.kts @@ -83,7 +83,8 @@ dependencies { testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false } testRuntime(project(":kotlin-scripting-compiler")) testRuntime(project(":sam-with-receiver-ide-plugin")) { isTransitive = false } - testRuntime(project(":kotlinx-serialization-compiler-plugin")) { isTransitive = false } + testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) { isTransitive = false } testRuntime(project(":idea:idea-android")) { isTransitive = false } testRuntime(project(":plugins:lint")) { isTransitive = false } testRuntime(project(":plugins:uast-kotlin")) diff --git a/idea/build.gradle.kts.173 b/idea/build.gradle.kts.173 index dc01d94d35d..9a850371e01 100644 --- a/idea/build.gradle.kts.173 +++ b/idea/build.gradle.kts.173 @@ -83,7 +83,8 @@ dependencies { testRuntime(project(":kotlin-scripting-compiler")) testRuntime(project(":plugins:annotation-based-compiler-plugins-ide-support")) { isTransitive = false } testRuntime(project(":sam-with-receiver-ide-plugin")) { isTransitive = false } - testRuntime(project(":kotlinx-serialization-compiler-plugin")) { isTransitive = false } + testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) { isTransitive = false } testRuntime(project(":idea:idea-android")) { isTransitive = false } testRuntime(project(":plugins:lint")) { isTransitive = false } testRuntime(project(":plugins:uast-kotlin")) diff --git a/idea/build.gradle.kts.as31 b/idea/build.gradle.kts.as31 index 1d5e52afa61..1029b54e9ec 100644 --- a/idea/build.gradle.kts.as31 +++ b/idea/build.gradle.kts.as31 @@ -83,7 +83,8 @@ dependencies { testRuntime(project(":kotlin-scripting-compiler")) testRuntime(project(":plugins:annotation-based-compiler-plugins-ide-support")) { isTransitive = false } testRuntime(project(":sam-with-receiver-ide-plugin")) { isTransitive = false } - testRuntime(project(":kotlinx-serialization-compiler-plugin")) { isTransitive = false } + testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) { isTransitive = false } testRuntime(project(":idea:idea-android")) { isTransitive = false } testRuntime(project(":plugins:lint")) { isTransitive = false } testRuntime(project(":plugins:uast-kotlin")) diff --git a/idea/build.gradle.kts.as32 b/idea/build.gradle.kts.as32 index e81b07a8e14..39ae7cdf60f 100644 --- a/idea/build.gradle.kts.as32 +++ b/idea/build.gradle.kts.as32 @@ -83,7 +83,8 @@ dependencies { testRuntime(project(":sam-with-receiver-ide-plugin")) { isTransitive = false } testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false } testRuntime(project(":kotlin-scripting-compiler")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) { isTransitive = false } + testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) { isTransitive = false } testRuntime(project(":idea:idea-android")) { isTransitive = false } testRuntime(project(":plugins:lint")) { isTransitive = false } testRuntime(project(":plugins:uast-kotlin")) diff --git a/idea/build.gradle.kts.as33 b/idea/build.gradle.kts.as33 index ee5aef09f95..a7bfa058636 100644 --- a/idea/build.gradle.kts.as33 +++ b/idea/build.gradle.kts.as33 @@ -83,7 +83,8 @@ dependencies { testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false } testRuntime(project(":kotlin-scripting-compiler")) testRuntime(project(":sam-with-receiver-ide-plugin")) { isTransitive = false } - testRuntime(project(":kotlinx-serialization-compiler-plugin")) { isTransitive = false } + testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) { isTransitive = false } testRuntime(project(":idea:idea-android")) { isTransitive = false } testRuntime(project(":plugins:lint")) { isTransitive = false } testRuntime(project(":plugins:uast-kotlin")) diff --git a/idea/idea-android/build.gradle.kts b/idea/idea-android/build.gradle.kts index f4d3a5d0d79..dd3bbb9d4f9 100644 --- a/idea/idea-android/build.gradle.kts +++ b/idea/idea-android/build.gradle.kts @@ -51,7 +51,7 @@ dependencies { testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(intellijPluginDep("android")) testRuntime(intellijPluginDep("smali")) diff --git a/idea/idea-android/build.gradle.kts.173 b/idea/idea-android/build.gradle.kts.173 index 138ebc47953..a5971ecc3d7 100644 --- a/idea/idea-android/build.gradle.kts.173 +++ b/idea/idea-android/build.gradle.kts.173 @@ -51,7 +51,7 @@ dependencies { testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(intellijPluginDep("android")) testRuntime(intellijPluginDep("copyright")) diff --git a/idea/idea-android/build.gradle.kts.as31 b/idea/idea-android/build.gradle.kts.as31 index 91a746bdb35..dafc72f76c2 100644 --- a/idea/idea-android/build.gradle.kts.as31 +++ b/idea/idea-android/build.gradle.kts.as31 @@ -51,7 +51,7 @@ dependencies { testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(intellijPluginDep("android")) testRuntime(intellijPluginDep("smali")) diff --git a/idea/idea-android/build.gradle.kts.as32 b/idea/idea-android/build.gradle.kts.as32 index 91a746bdb35..dafc72f76c2 100644 --- a/idea/idea-android/build.gradle.kts.as32 +++ b/idea/idea-android/build.gradle.kts.as32 @@ -51,7 +51,7 @@ dependencies { testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(intellijPluginDep("android")) testRuntime(intellijPluginDep("smali")) diff --git a/idea/idea-android/build.gradle.kts.as33 b/idea/idea-android/build.gradle.kts.as33 index cf30ee64be1..ea7f7674ce8 100644 --- a/idea/idea-android/build.gradle.kts.as33 +++ b/idea/idea-android/build.gradle.kts.as33 @@ -51,7 +51,7 @@ dependencies { testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(intellijPluginDep("android")) testRuntime(intellijPluginDep("smali")) diff --git a/idea/idea-gradle/build.gradle.kts b/idea/idea-gradle/build.gradle.kts index 352ced94440..4ec774eaf6b 100644 --- a/idea/idea-gradle/build.gradle.kts +++ b/idea/idea-gradle/build.gradle.kts @@ -44,7 +44,7 @@ dependencies { testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) // TODO: the order of the plugins matters here, consider avoiding order-dependency testRuntime(intellijPluginDep("junit")) testRuntime(intellijPluginDep("testng")) diff --git a/idea/idea-gradle/build.gradle.kts.173 b/idea/idea-gradle/build.gradle.kts.173 index da553c53b33..fe144b1b247 100644 --- a/idea/idea-gradle/build.gradle.kts.173 +++ b/idea/idea-gradle/build.gradle.kts.173 @@ -44,7 +44,7 @@ dependencies { testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) // TODO: the order of the plugins matters here, consider avoiding order-dependency testRuntime(intellijPluginDep("junit")) testRuntime(intellijPluginDep("testng")) diff --git a/idea/idea-gradle/build.gradle.kts.as31 b/idea/idea-gradle/build.gradle.kts.as31 index 5fa25801c37..86cec50f8f6 100644 --- a/idea/idea-gradle/build.gradle.kts.as31 +++ b/idea/idea-gradle/build.gradle.kts.as31 @@ -44,7 +44,7 @@ dependencies { testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) // TODO: the order of the plugins matters here, consider avoiding order-dependency testRuntime(intellijPluginDep("junit")) testRuntime(intellijPluginDep("testng")) diff --git a/idea/idea-gradle/build.gradle.kts.as32 b/idea/idea-gradle/build.gradle.kts.as32 index 5fa25801c37..86cec50f8f6 100644 --- a/idea/idea-gradle/build.gradle.kts.as32 +++ b/idea/idea-gradle/build.gradle.kts.as32 @@ -44,7 +44,7 @@ dependencies { testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) // TODO: the order of the plugins matters here, consider avoiding order-dependency testRuntime(intellijPluginDep("junit")) testRuntime(intellijPluginDep("testng")) diff --git a/idea/idea-gradle/build.gradle.kts.as33 b/idea/idea-gradle/build.gradle.kts.as33 index 5fa25801c37..86cec50f8f6 100644 --- a/idea/idea-gradle/build.gradle.kts.as33 +++ b/idea/idea-gradle/build.gradle.kts.as33 @@ -44,7 +44,7 @@ dependencies { testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) // TODO: the order of the plugins matters here, consider avoiding order-dependency testRuntime(intellijPluginDep("junit")) testRuntime(intellijPluginDep("testng")) diff --git a/idea/idea-maven/build.gradle.kts b/idea/idea-maven/build.gradle.kts index b08b4850857..bf6a49b3e41 100644 --- a/idea/idea-maven/build.gradle.kts +++ b/idea/idea-maven/build.gradle.kts @@ -41,7 +41,7 @@ dependencies { testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(intellijDep()) // TODO: the order of the plugins matters here, consider avoiding order-dependency diff --git a/idea/idea-maven/build.gradle.kts.173 b/idea/idea-maven/build.gradle.kts.173 index 7927fd866a2..42dc5f76bff 100644 --- a/idea/idea-maven/build.gradle.kts.173 +++ b/idea/idea-maven/build.gradle.kts.173 @@ -41,7 +41,7 @@ dependencies { testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(intellijDep()) // TODO: the order of the plugins matters here, consider avoiding order-dependency diff --git a/idea/idea-maven/build.gradle.kts.as31 b/idea/idea-maven/build.gradle.kts.as31 index b10d9352ea0..a89bd48b85e 100644 --- a/idea/idea-maven/build.gradle.kts.as31 +++ b/idea/idea-maven/build.gradle.kts.as31 @@ -41,7 +41,7 @@ dependencies { testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(intellijDep()) // TODO: the order of the plugins matters here, consider avoiding order-dependency diff --git a/idea/idea-maven/build.gradle.kts.as32 b/idea/idea-maven/build.gradle.kts.as32 index b10d9352ea0..a89bd48b85e 100644 --- a/idea/idea-maven/build.gradle.kts.as32 +++ b/idea/idea-maven/build.gradle.kts.as32 @@ -41,7 +41,7 @@ dependencies { testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(intellijDep()) // TODO: the order of the plugins matters here, consider avoiding order-dependency diff --git a/idea/idea-maven/build.gradle.kts.as33 b/idea/idea-maven/build.gradle.kts.as33 index 03895cf373f..32da0a65381 100644 --- a/idea/idea-maven/build.gradle.kts.as33 +++ b/idea/idea-maven/build.gradle.kts.as33 @@ -41,7 +41,7 @@ dependencies { testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(intellijDep()) // TODO: the order of the plugins matters here, consider avoiding order-dependency diff --git a/j2k/build.gradle.kts b/j2k/build.gradle.kts index 7fb209611a6..62ae7eea69d 100644 --- a/j2k/build.gradle.kts +++ b/j2k/build.gradle.kts @@ -33,7 +33,7 @@ dependencies { testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(intellijPluginDep("properties")) testRuntime(intellijPluginDep("gradle")) testRuntime(intellijPluginDep("Groovy")) diff --git a/j2k/build.gradle.kts.173 b/j2k/build.gradle.kts.173 index 782febf4dd4..19b7f9a33c3 100644 --- a/j2k/build.gradle.kts.173 +++ b/j2k/build.gradle.kts.173 @@ -32,7 +32,7 @@ dependencies { testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(intellijPluginDep("properties")) testRuntime(intellijPluginDep("gradle")) testRuntime(intellijPluginDep("Groovy")) diff --git a/j2k/build.gradle.kts.as31 b/j2k/build.gradle.kts.as31 index 9732a3c0306..a87062e92e9 100644 --- a/j2k/build.gradle.kts.as31 +++ b/j2k/build.gradle.kts.as31 @@ -32,7 +32,7 @@ dependencies { testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(intellijPluginDep("properties")) testRuntime(intellijPluginDep("gradle")) testRuntime(intellijPluginDep("Groovy")) diff --git a/j2k/build.gradle.kts.as32 b/j2k/build.gradle.kts.as32 index 3c277c0eea0..72a06b30dab 100644 --- a/j2k/build.gradle.kts.as32 +++ b/j2k/build.gradle.kts.as32 @@ -33,7 +33,7 @@ dependencies { testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(intellijPluginDep("properties")) testRuntime(intellijPluginDep("gradle")) testRuntime(intellijPluginDep("Groovy")) diff --git a/j2k/build.gradle.kts.as33 b/j2k/build.gradle.kts.as33 index ae9762ef03a..49f86d32dba 100644 --- a/j2k/build.gradle.kts.as33 +++ b/j2k/build.gradle.kts.as33 @@ -33,7 +33,7 @@ dependencies { testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(intellijPluginDep("properties")) testRuntime(intellijPluginDep("gradle")) testRuntime(intellijPluginDep("Groovy")) diff --git a/plugins/android-extensions/android-extensions-idea/build.gradle.kts b/plugins/android-extensions/android-extensions-idea/build.gradle.kts index 65792cbd1a1..6ff419c7466 100644 --- a/plugins/android-extensions/android-extensions-idea/build.gradle.kts +++ b/plugins/android-extensions/android-extensions-idea/build.gradle.kts @@ -47,7 +47,7 @@ dependencies { testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(project(":plugins:lint")) testRuntime(intellijPluginDep("junit")) testRuntime(intellijPluginDep("IntelliLang")) diff --git a/plugins/android-extensions/android-extensions-idea/build.gradle.kts.173 b/plugins/android-extensions/android-extensions-idea/build.gradle.kts.173 index e73c73cc787..5feab020f6f 100644 --- a/plugins/android-extensions/android-extensions-idea/build.gradle.kts.173 +++ b/plugins/android-extensions/android-extensions-idea/build.gradle.kts.173 @@ -47,7 +47,7 @@ dependencies { testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(project(":plugins:lint")) testRuntime(intellijPluginDep("junit")) testRuntime(intellijPluginDep("IntelliLang")) diff --git a/plugins/android-extensions/android-extensions-idea/build.gradle.kts.as31 b/plugins/android-extensions/android-extensions-idea/build.gradle.kts.as31 index 3592cb5f6e5..3dedbdc1737 100644 --- a/plugins/android-extensions/android-extensions-idea/build.gradle.kts.as31 +++ b/plugins/android-extensions/android-extensions-idea/build.gradle.kts.as31 @@ -47,7 +47,7 @@ dependencies { testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(project(":plugins:lint")) testRuntime(intellijPluginDep("junit")) testRuntime(intellijPluginDep("IntelliLang")) diff --git a/plugins/android-extensions/android-extensions-idea/build.gradle.kts.as32 b/plugins/android-extensions/android-extensions-idea/build.gradle.kts.as32 index 3592cb5f6e5..3dedbdc1737 100644 --- a/plugins/android-extensions/android-extensions-idea/build.gradle.kts.as32 +++ b/plugins/android-extensions/android-extensions-idea/build.gradle.kts.as32 @@ -47,7 +47,7 @@ dependencies { testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(project(":plugins:lint")) testRuntime(intellijPluginDep("junit")) testRuntime(intellijPluginDep("IntelliLang")) diff --git a/plugins/android-extensions/android-extensions-idea/build.gradle.kts.as33 b/plugins/android-extensions/android-extensions-idea/build.gradle.kts.as33 index 6f9024def2f..d20a0a59507 100644 --- a/plugins/android-extensions/android-extensions-idea/build.gradle.kts.as33 +++ b/plugins/android-extensions/android-extensions-idea/build.gradle.kts.as33 @@ -47,7 +47,7 @@ dependencies { testRuntime(project(":noarg-ide-plugin")) testRuntime(project(":allopen-ide-plugin")) testRuntime(project(":kotlin-scripting-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(project(":plugins:lint")) testRuntime(intellijPluginDep("junit")) testRuntime(intellijPluginDep("IntelliLang")) diff --git a/plugins/kotlin-serialization/kotlin-serialization-compiler/build.gradle.kts b/plugins/kotlin-serialization/kotlin-serialization-compiler/build.gradle.kts index e080e317a66..9bc0a2cc0be 100644 --- a/plugins/kotlin-serialization/kotlin-serialization-compiler/build.gradle.kts +++ b/plugins/kotlin-serialization/kotlin-serialization-compiler/build.gradle.kts @@ -10,20 +10,13 @@ jvmTarget = "1.6" dependencies { compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) - excludeInAndroidStudio(rootProject) { compileOnly(intellijPluginDep("maven")) } - compileOnly(project(":jps-plugin")) - compileOnly(project(":compiler:plugin-api")) - compileOnly(project(":compiler:frontend")) - compileOnly(project(":compiler:backend")) - compileOnly(project(":js:js.frontend")) - compileOnly(project(":js:js.translator")) - compileOnly(project(":idea")) - compileOnly(project(":idea:idea-jps-common")) - compileOnly(project(":idea:idea-gradle")) - compileOnly(project(":idea:idea-maven")) - runtime(projectRuntimeJar(":kotlin-compiler")) + compile(project(":compiler:plugin-api")) + compile(project(":compiler:frontend")) + compile(project(":compiler:backend")) + compile(project(":js:js.frontend")) + compile(project(":js:js.translator")) + runtime(projectDist(":kotlin-stdlib")) } @@ -38,6 +31,6 @@ val jar = runtimeJar { dist(targetName = the().archivesBaseName + ".jar") -runtimeJar() - -ideaPlugin() \ No newline at end of file +ideaPlugin { + from(jar) +} diff --git a/plugins/kotlin-serialization/kotlin-serialization-compiler/src/META-INF/services/org.jetbrains.kotlin.jps.build.KotlinJpsCompilerArgumentsProvider b/plugins/kotlin-serialization/kotlin-serialization-compiler/src/META-INF/services/org.jetbrains.kotlin.jps.build.KotlinJpsCompilerArgumentsProvider deleted file mode 100644 index c44d1917ec1..00000000000 --- a/plugins/kotlin-serialization/kotlin-serialization-compiler/src/META-INF/services/org.jetbrains.kotlin.jps.build.KotlinJpsCompilerArgumentsProvider +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright 2010-2017 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. -# - -org.jetbrains.kotlinx.serialization.jps.KotlinSerializationJpsPlugin \ No newline at end of file diff --git a/plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/jps/KotlinSerializationJpsPlugin.kt b/plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/jps/KotlinSerializationJpsPlugin.kt deleted file mode 100644 index fe569bcdeb9..00000000000 --- a/plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/jps/KotlinSerializationJpsPlugin.kt +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2010-2017 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.kotlinx.serialization.jps - -import com.intellij.util.PathUtil -import org.jetbrains.jps.incremental.CompileContext -import org.jetbrains.jps.incremental.ModuleBuildTarget -import org.jetbrains.kotlin.jps.build.KotlinJpsCompilerArgumentsProvider -import java.io.File - -class KotlinSerializationJpsPlugin : KotlinJpsCompilerArgumentsProvider { - val JAR_FILE_NAME = "kotlinx-serialization-compiler-plugin.jar" - - override fun getExtraArguments(moduleBuildTarget: ModuleBuildTarget, context: CompileContext): List { - return emptyList() - } - - override fun getClasspath(moduleBuildTarget: ModuleBuildTarget, context: CompileContext): List { - val inJar = File(PathUtil.getJarPathForClass(this::class.java)).isFile - return listOf( - if (inJar) { - File(PathUtil.getJarPathForClass(this::class.java)).absolutePath - } else { - // We're in tests now - val kotlinProjectDirectory = File(PathUtil.getJarPathForClass(javaClass)).parentFile.parentFile.parentFile - File(kotlinProjectDirectory, "dist/artifacts/Serialization/lib/$JAR_FILE_NAME").absolutePath - } - ) - } -} diff --git a/plugins/kotlin-serialization/kotlin-serialization-ide/build.gradle.kts b/plugins/kotlin-serialization/kotlin-serialization-ide/build.gradle.kts new file mode 100644 index 00000000000..df115696d5b --- /dev/null +++ b/plugins/kotlin-serialization/kotlin-serialization-ide/build.gradle.kts @@ -0,0 +1,29 @@ + +description = "Kotlinx Serialization IDEA Plugin" + +plugins { + kotlin("jvm") + id("jps-compatible") +} + +jvmTarget = "1.6" + +dependencies { + compile(project(":kotlinx-serialization-compiler-plugin")) + compile(project(":idea")) + compile(project(":idea:idea-gradle")) + compile(project(":idea:idea-maven")) + compileOnly(intellijDep()) + excludeInAndroidStudio(rootProject) { compileOnly(intellijPluginDep("maven")) } + compileOnly(intellijPluginDep("gradle")) +} + +sourceSets { + "main" { projectDefault() } + "test" {} +} + +runtimeJar() + +ideaPlugin() + diff --git a/plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationGradleImportHandler.kt b/plugins/kotlin-serialization/kotlin-serialization-ide/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationGradleImportHandler.kt similarity index 100% rename from plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationGradleImportHandler.kt rename to plugins/kotlin-serialization/kotlin-serialization-ide/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationGradleImportHandler.kt diff --git a/plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationImportHandler.kt b/plugins/kotlin-serialization/kotlin-serialization-ide/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationImportHandler.kt similarity index 100% rename from plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationImportHandler.kt rename to plugins/kotlin-serialization/kotlin-serialization-ide/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationImportHandler.kt diff --git a/plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt b/plugins/kotlin-serialization/kotlin-serialization-ide/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt similarity index 100% rename from plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt rename to plugins/kotlin-serialization/kotlin-serialization-ide/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt diff --git a/plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt.as31 b/plugins/kotlin-serialization/kotlin-serialization-ide/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt.as31 similarity index 100% rename from plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt.as31 rename to plugins/kotlin-serialization/kotlin-serialization-ide/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt.as31 diff --git a/plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt.as32 b/plugins/kotlin-serialization/kotlin-serialization-ide/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt.as32 similarity index 100% rename from plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt.as32 rename to plugins/kotlin-serialization/kotlin-serialization-ide/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt.as32 diff --git a/plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt.as33 b/plugins/kotlin-serialization/kotlin-serialization-ide/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt.as33 similarity index 100% rename from plugins/kotlin-serialization/kotlin-serialization-compiler/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt.as33 rename to plugins/kotlin-serialization/kotlin-serialization-ide/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt.as33 diff --git a/plugins/uast-kotlin/build.gradle.kts b/plugins/uast-kotlin/build.gradle.kts index 5245f5cb23c..76ff6d5c9f9 100644 --- a/plugins/uast-kotlin/build.gradle.kts +++ b/plugins/uast-kotlin/build.gradle.kts @@ -38,7 +38,7 @@ dependencies { testRuntime(project(":kotlin-scripting-idea")) testRuntime(project(":plugins:android-extensions-ide")) testRuntime(project(":plugins:kapt3-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(intellijDep()) testRuntime(intellijPluginDep("junit")) testRuntime(intellijPluginDep("gradle")) diff --git a/plugins/uast-kotlin/build.gradle.kts.173 b/plugins/uast-kotlin/build.gradle.kts.173 index 23280ab64c9..e215739743d 100644 --- a/plugins/uast-kotlin/build.gradle.kts.173 +++ b/plugins/uast-kotlin/build.gradle.kts.173 @@ -36,7 +36,7 @@ dependencies { testRuntime(project(":kotlin-scripting-idea")) testRuntime(project(":plugins:android-extensions-ide")) testRuntime(project(":plugins:kapt3-idea")) - testRuntime(project(":kotlinx-serialization-compiler-plugin")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) testRuntime(intellijDep()) testRuntime(intellijPluginDep("junit")) testRuntime(intellijPluginDep("gradle")) diff --git a/settings.gradle b/settings.gradle index 61cfad23eb0..6914f72895e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -186,6 +186,7 @@ include ":kotlin-build-common", ":test-instrumenter", ":kotlinx-serialization-compiler-plugin", + ":kotlinx-serialization-ide-plugin", ":kotlinx-gradle-serialization-plugin", ":kotlinx-gradle-serialization-plugin-unshaded" @@ -304,5 +305,6 @@ project(':kotlin-allopen:plugin-marker').projectDir = file("$rootDir/libraries/t project(':kotlin-noarg:plugin-marker').projectDir = file("$rootDir/libraries/tools/kotlin-noarg/plugin-marker") project(':kotlinx-serialization-compiler-plugin').projectDir = file("$rootDir/plugins/kotlin-serialization/kotlin-serialization-compiler") +project(':kotlinx-serialization-ide-plugin').projectDir = file("$rootDir/plugins/kotlin-serialization/kotlin-serialization-ide") project(':kotlinx-gradle-serialization-plugin').projectDir = file("$rootDir/libraries/tools/kotlin-serialization") project(':kotlinx-gradle-serialization-plugin-unshaded').projectDir = file("$rootDir/libraries/tools/kotlin-serialization-unshaded") diff --git a/ultimate/build.gradle.kts b/ultimate/build.gradle.kts index d0d8d814bea..14f46caa45e 100644 --- a/ultimate/build.gradle.kts +++ b/ultimate/build.gradle.kts @@ -95,6 +95,7 @@ dependencies { testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false } testRuntime(project(":kotlin-scripting-compiler")) { isTransitive = false } testRuntime(project(":kotlinx-serialization-compiler-plugin")) { isTransitive = false } + testRuntime(project(":kotlinx-serialization-ide-plugin")) { isTransitive = false } testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false } testRuntime(project(":plugins:uast-kotlin")) testRuntime(project(":plugins:uast-kotlin-idea")) diff --git a/ultimate/build.gradle.kts.173 b/ultimate/build.gradle.kts.173 index ea369a5b70a..3e3c8d2f49c 100644 --- a/ultimate/build.gradle.kts.173 +++ b/ultimate/build.gradle.kts.173 @@ -95,6 +95,7 @@ dependencies { testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false } testRuntime(project(":kotlin-scripting-compiler")) { isTransitive = false } testRuntime(project(":kotlinx-serialization-compiler-plugin")) { isTransitive = false } + testRuntime(project(":kotlinx-serialization-ide-plugin")) { isTransitive = false } testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false } testRuntime(project(":plugins:uast-kotlin")) testRuntime(project(":plugins:uast-kotlin-idea")) diff --git a/ultimate/build.gradle.kts.as31 b/ultimate/build.gradle.kts.as31 index 88f678a3d53..e5eb2ab1f02 100644 --- a/ultimate/build.gradle.kts.as31 +++ b/ultimate/build.gradle.kts.as31 @@ -95,6 +95,7 @@ dependencies { testRuntime(project(":allopen-ide-plugin")) { isTransitive = false } testRuntime(project(":kotlin-allopen-compiler-plugin")) { isTransitive = false } testRuntime(project(":kotlinx-serialization-compiler-plugin")) { isTransitive = false } + testRuntime(project(":kotlinx-serialization-ide-plugin")) { isTransitive = false } testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false } testRuntime(project(":kotlin-scripting-compiler")) { isTransitive = false } testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false } diff --git a/ultimate/build.gradle.kts.as32 b/ultimate/build.gradle.kts.as32 index 5e9c08ddb1b..69f74a289b0 100644 --- a/ultimate/build.gradle.kts.as32 +++ b/ultimate/build.gradle.kts.as32 @@ -96,6 +96,7 @@ dependencies { testRuntime(project(":kotlin-allopen-compiler-plugin")) { isTransitive = false } testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false } testRuntime(project(":kotlinx-serialization-compiler-plugin")) { isTransitive = false } + testRuntime(project(":kotlinx-serialization-ide-plugin")) { isTransitive = false } testRuntime(project(":kotlin-scripting-compiler")) { isTransitive = false } testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false } testRuntime(project(":plugins:uast-kotlin"))