Integrate serialization plugin into big Kotlin plugin
Split import handlers into multiple files Add empty Maven handler for Android Studio Add testRuntime dependency on kx-serialization-plugin for all modules which require compiler plugins in test classpath
This commit is contained in:
@@ -88,7 +88,6 @@ val commonLocalDataDir = "$rootDir/local"
|
|||||||
val ideaSandboxDir = "$commonLocalDataDir/ideaSandbox"
|
val ideaSandboxDir = "$commonLocalDataDir/ideaSandbox"
|
||||||
val ideaUltimateSandboxDir = "$commonLocalDataDir/ideaUltimateSandbox"
|
val ideaUltimateSandboxDir = "$commonLocalDataDir/ideaUltimateSandbox"
|
||||||
val ideaPluginDir = "$distDir/artifacts/ideaPlugin/Kotlin"
|
val ideaPluginDir = "$distDir/artifacts/ideaPlugin/Kotlin"
|
||||||
val serialPluginDir = "$distDir/artifacts/Serialization"
|
|
||||||
val ideaUltimatePluginDir = "$distDir/artifacts/ideaUltimatePlugin/Kotlin"
|
val ideaUltimatePluginDir = "$distDir/artifacts/ideaUltimatePlugin/Kotlin"
|
||||||
val cidrPluginDir = "$distDir/artifacts/cidrPlugin/Kotlin"
|
val cidrPluginDir = "$distDir/artifacts/cidrPlugin/Kotlin"
|
||||||
|
|
||||||
@@ -99,7 +98,6 @@ extra["commonLocalDataDir"] = project.file(commonLocalDataDir)
|
|||||||
extra["ideaSandboxDir"] = project.file(ideaSandboxDir)
|
extra["ideaSandboxDir"] = project.file(ideaSandboxDir)
|
||||||
extra["ideaUltimateSandboxDir"] = project.file(ideaUltimateSandboxDir)
|
extra["ideaUltimateSandboxDir"] = project.file(ideaUltimateSandboxDir)
|
||||||
extra["ideaPluginDir"] = project.file(ideaPluginDir)
|
extra["ideaPluginDir"] = project.file(ideaPluginDir)
|
||||||
extra["serialPluginDir"] = project.file(serialPluginDir)
|
|
||||||
extra["ideaUltimatePluginDir"] = project.file(ideaUltimatePluginDir)
|
extra["ideaUltimatePluginDir"] = project.file(ideaUltimatePluginDir)
|
||||||
extra["cidrPluginDir"] = project.file(cidrPluginDir)
|
extra["cidrPluginDir"] = project.file(cidrPluginDir)
|
||||||
extra["isSonatypeRelease"] = false
|
extra["isSonatypeRelease"] = false
|
||||||
|
|||||||
@@ -17,9 +17,7 @@ dependencies {
|
|||||||
|
|
||||||
val ideaPluginDir: File by rootProject.extra
|
val ideaPluginDir: File by rootProject.extra
|
||||||
val ideaSandboxDir: File by rootProject.extra
|
val ideaSandboxDir: File by rootProject.extra
|
||||||
val serialPluginDir: File by rootProject.extra
|
|
||||||
|
|
||||||
runIdeTask("runIde", ideaPluginDir, ideaSandboxDir, serialPluginDir) {
|
runIdeTask("runIde", ideaPluginDir, ideaSandboxDir) {
|
||||||
// TODO: add serialization plugin to pluginDir
|
dependsOn(":dist", ":ideaPlugin")
|
||||||
dependsOn(":dist", ":ideaPlugin", ":kotlinx-serialization-compiler-plugin:dist")
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ dependencies {
|
|||||||
testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false }
|
testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false }
|
||||||
testRuntime(project(":kotlin-scripting-compiler"))
|
testRuntime(project(":kotlin-scripting-compiler"))
|
||||||
testRuntime(project(":sam-with-receiver-ide-plugin")) { isTransitive = false }
|
testRuntime(project(":sam-with-receiver-ide-plugin")) { isTransitive = false }
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin")) { isTransitive = false }
|
||||||
testRuntime(project(":idea:idea-android")) { isTransitive = false }
|
testRuntime(project(":idea:idea-android")) { isTransitive = false }
|
||||||
testRuntime(project(":plugins:lint")) { isTransitive = false }
|
testRuntime(project(":plugins:lint")) { isTransitive = false }
|
||||||
testRuntime(project(":plugins:uast-kotlin"))
|
testRuntime(project(":plugins:uast-kotlin"))
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ dependencies {
|
|||||||
testRuntime(project(":kotlin-scripting-compiler"))
|
testRuntime(project(":kotlin-scripting-compiler"))
|
||||||
testRuntime(project(":plugins:annotation-based-compiler-plugins-ide-support")) { isTransitive = false }
|
testRuntime(project(":plugins:annotation-based-compiler-plugins-ide-support")) { isTransitive = false }
|
||||||
testRuntime(project(":sam-with-receiver-ide-plugin")) { isTransitive = false }
|
testRuntime(project(":sam-with-receiver-ide-plugin")) { isTransitive = false }
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin")) { isTransitive = false }
|
||||||
testRuntime(project(":idea:idea-android")) { isTransitive = false }
|
testRuntime(project(":idea:idea-android")) { isTransitive = false }
|
||||||
testRuntime(project(":plugins:lint")) { isTransitive = false }
|
testRuntime(project(":plugins:lint")) { isTransitive = false }
|
||||||
testRuntime(project(":plugins:uast-kotlin"))
|
testRuntime(project(":plugins:uast-kotlin"))
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ dependencies {
|
|||||||
testRuntime(project(":kotlin-scripting-compiler"))
|
testRuntime(project(":kotlin-scripting-compiler"))
|
||||||
testRuntime(project(":plugins:annotation-based-compiler-plugins-ide-support")) { isTransitive = false }
|
testRuntime(project(":plugins:annotation-based-compiler-plugins-ide-support")) { isTransitive = false }
|
||||||
testRuntime(project(":sam-with-receiver-ide-plugin")) { isTransitive = false }
|
testRuntime(project(":sam-with-receiver-ide-plugin")) { isTransitive = false }
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin")) { isTransitive = false }
|
||||||
testRuntime(project(":idea:idea-android")) { isTransitive = false }
|
testRuntime(project(":idea:idea-android")) { isTransitive = false }
|
||||||
testRuntime(project(":plugins:lint")) { isTransitive = false }
|
testRuntime(project(":plugins:lint")) { isTransitive = false }
|
||||||
testRuntime(project(":plugins:uast-kotlin"))
|
testRuntime(project(":plugins:uast-kotlin"))
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ dependencies {
|
|||||||
testRuntime(project(":sam-with-receiver-ide-plugin")) { isTransitive = false }
|
testRuntime(project(":sam-with-receiver-ide-plugin")) { isTransitive = false }
|
||||||
testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false }
|
testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false }
|
||||||
testRuntime(project(":kotlin-scripting-compiler"))
|
testRuntime(project(":kotlin-scripting-compiler"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin")) { isTransitive = false }
|
||||||
testRuntime(project(":idea:idea-android")) { isTransitive = false }
|
testRuntime(project(":idea:idea-android")) { isTransitive = false }
|
||||||
testRuntime(project(":plugins:lint")) { isTransitive = false }
|
testRuntime(project(":plugins:lint")) { isTransitive = false }
|
||||||
testRuntime(project(":plugins:uast-kotlin"))
|
testRuntime(project(":plugins:uast-kotlin"))
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ dependencies {
|
|||||||
testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false }
|
testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false }
|
||||||
testRuntime(project(":kotlin-scripting-compiler"))
|
testRuntime(project(":kotlin-scripting-compiler"))
|
||||||
testRuntime(project(":sam-with-receiver-ide-plugin")) { isTransitive = false }
|
testRuntime(project(":sam-with-receiver-ide-plugin")) { isTransitive = false }
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin")) { isTransitive = false }
|
||||||
testRuntime(project(":idea:idea-android")) { isTransitive = false }
|
testRuntime(project(":idea:idea-android")) { isTransitive = false }
|
||||||
testRuntime(project(":plugins:lint")) { isTransitive = false }
|
testRuntime(project(":plugins:lint")) { isTransitive = false }
|
||||||
testRuntime(project(":plugins:uast-kotlin"))
|
testRuntime(project(":plugins:uast-kotlin"))
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ dependencies {
|
|||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
|
|
||||||
testRuntime(intellijPluginDep("android"))
|
testRuntime(intellijPluginDep("android"))
|
||||||
testRuntime(intellijPluginDep("smali"))
|
testRuntime(intellijPluginDep("smali"))
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ dependencies {
|
|||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
|
|
||||||
testRuntime(intellijPluginDep("android"))
|
testRuntime(intellijPluginDep("android"))
|
||||||
testRuntime(intellijPluginDep("copyright"))
|
testRuntime(intellijPluginDep("copyright"))
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ dependencies {
|
|||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
|
|
||||||
testRuntime(intellijPluginDep("android"))
|
testRuntime(intellijPluginDep("android"))
|
||||||
testRuntime(intellijPluginDep("smali"))
|
testRuntime(intellijPluginDep("smali"))
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ dependencies {
|
|||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
|
|
||||||
testRuntime(intellijPluginDep("android"))
|
testRuntime(intellijPluginDep("android"))
|
||||||
testRuntime(intellijPluginDep("smali"))
|
testRuntime(intellijPluginDep("smali"))
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ dependencies {
|
|||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
|
|
||||||
testRuntime(intellijPluginDep("android"))
|
testRuntime(intellijPluginDep("android"))
|
||||||
testRuntime(intellijPluginDep("smali"))
|
testRuntime(intellijPluginDep("smali"))
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ dependencies {
|
|||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
||||||
testRuntime(intellijPluginDep("junit"))
|
testRuntime(intellijPluginDep("junit"))
|
||||||
testRuntime(intellijPluginDep("testng"))
|
testRuntime(intellijPluginDep("testng"))
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ dependencies {
|
|||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
||||||
testRuntime(intellijPluginDep("junit"))
|
testRuntime(intellijPluginDep("junit"))
|
||||||
testRuntime(intellijPluginDep("testng"))
|
testRuntime(intellijPluginDep("testng"))
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ dependencies {
|
|||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
||||||
testRuntime(intellijPluginDep("junit"))
|
testRuntime(intellijPluginDep("junit"))
|
||||||
testRuntime(intellijPluginDep("testng"))
|
testRuntime(intellijPluginDep("testng"))
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ dependencies {
|
|||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
||||||
testRuntime(intellijPluginDep("junit"))
|
testRuntime(intellijPluginDep("junit"))
|
||||||
testRuntime(intellijPluginDep("testng"))
|
testRuntime(intellijPluginDep("testng"))
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ dependencies {
|
|||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
||||||
testRuntime(intellijPluginDep("junit"))
|
testRuntime(intellijPluginDep("junit"))
|
||||||
testRuntime(intellijPluginDep("testng"))
|
testRuntime(intellijPluginDep("testng"))
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ dependencies {
|
|||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
|
|
||||||
testRuntime(intellijDep())
|
testRuntime(intellijDep())
|
||||||
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ dependencies {
|
|||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
|
|
||||||
testRuntime(intellijDep())
|
testRuntime(intellijDep())
|
||||||
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ dependencies {
|
|||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
|
|
||||||
testRuntime(intellijDep())
|
testRuntime(intellijDep())
|
||||||
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ dependencies {
|
|||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
|
|
||||||
testRuntime(intellijDep())
|
testRuntime(intellijDep())
|
||||||
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ dependencies {
|
|||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
|
|
||||||
testRuntime(intellijDep())
|
testRuntime(intellijDep())
|
||||||
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
// TODO: the order of the plugins matters here, consider avoiding order-dependency
|
||||||
|
|||||||
@@ -71,6 +71,7 @@
|
|||||||
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.kapt.idea.KaptGradleProjectImportHandler"/>
|
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.kapt.idea.KaptGradleProjectImportHandler"/>
|
||||||
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.noarg.ide.NoArgGradleProjectImportHandler"/>
|
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.noarg.ide.NoArgGradleProjectImportHandler"/>
|
||||||
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.samWithReceiver.ide.SamWithReceiverGradleProjectImportHandler"/>
|
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.samWithReceiver.ide.SamWithReceiverGradleProjectImportHandler"/>
|
||||||
|
<gradleProjectImportHandler implementation="org.jetbrains.kotlinx.serialization.idea.KotlinSerializationGradleImportHandler"/>
|
||||||
|
|
||||||
<projectConfigurator implementation="org.jetbrains.kotlin.idea.configuration.KotlinGradleModuleConfigurator"/>
|
<projectConfigurator implementation="org.jetbrains.kotlin.idea.configuration.KotlinGradleModuleConfigurator"/>
|
||||||
<projectConfigurator implementation="org.jetbrains.kotlin.idea.configuration.KotlinJsGradleModuleConfigurator"/>
|
<projectConfigurator implementation="org.jetbrains.kotlin.idea.configuration.KotlinJsGradleModuleConfigurator"/>
|
||||||
|
|||||||
@@ -69,6 +69,7 @@
|
|||||||
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.kapt.idea.KaptGradleProjectImportHandler"/>
|
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.kapt.idea.KaptGradleProjectImportHandler"/>
|
||||||
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.noarg.ide.NoArgGradleProjectImportHandler"/>
|
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.noarg.ide.NoArgGradleProjectImportHandler"/>
|
||||||
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.samWithReceiver.ide.SamWithReceiverGradleProjectImportHandler"/>
|
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.samWithReceiver.ide.SamWithReceiverGradleProjectImportHandler"/>
|
||||||
|
<gradleProjectImportHandler implementation="org.jetbrains.kotlinx.serialization.idea.KotlinSerializationGradleImportHandler"/>
|
||||||
|
|
||||||
<projectConfigurator implementation="org.jetbrains.kotlin.idea.configuration.KotlinGradleModuleConfigurator"/>
|
<projectConfigurator implementation="org.jetbrains.kotlin.idea.configuration.KotlinGradleModuleConfigurator"/>
|
||||||
<projectConfigurator implementation="org.jetbrains.kotlin.idea.configuration.KotlinJsGradleModuleConfigurator"/>
|
<projectConfigurator implementation="org.jetbrains.kotlin.idea.configuration.KotlinJsGradleModuleConfigurator"/>
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.kapt.idea.KaptGradleProjectImportHandler"/>
|
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.kapt.idea.KaptGradleProjectImportHandler"/>
|
||||||
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.noarg.ide.NoArgGradleProjectImportHandler"/>
|
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.noarg.ide.NoArgGradleProjectImportHandler"/>
|
||||||
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.samWithReceiver.ide.SamWithReceiverGradleProjectImportHandler"/>
|
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.samWithReceiver.ide.SamWithReceiverGradleProjectImportHandler"/>
|
||||||
|
<gradleProjectImportHandler implementation="org.jetbrains.kotlinx.serialization.idea.KotlinSerializationGradleImportHandler"/>
|
||||||
|
|
||||||
<projectConfigurator implementation="org.jetbrains.kotlin.idea.configuration.KotlinGradleModuleConfigurator"/>
|
<projectConfigurator implementation="org.jetbrains.kotlin.idea.configuration.KotlinGradleModuleConfigurator"/>
|
||||||
<projectConfigurator implementation="org.jetbrains.kotlin.idea.configuration.KotlinJsGradleModuleConfigurator"/>
|
<projectConfigurator implementation="org.jetbrains.kotlin.idea.configuration.KotlinJsGradleModuleConfigurator"/>
|
||||||
|
|||||||
@@ -79,6 +79,7 @@
|
|||||||
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.kapt.idea.KaptGradleProjectImportHandler"/>
|
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.kapt.idea.KaptGradleProjectImportHandler"/>
|
||||||
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.noarg.ide.NoArgGradleProjectImportHandler"/>
|
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.noarg.ide.NoArgGradleProjectImportHandler"/>
|
||||||
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.samWithReceiver.ide.SamWithReceiverGradleProjectImportHandler"/>
|
<gradleProjectImportHandler implementation="org.jetbrains.kotlin.samWithReceiver.ide.SamWithReceiverGradleProjectImportHandler"/>
|
||||||
|
<gradleProjectImportHandler implementation="org.jetbrains.kotlinx.serialization.idea.KotlinSerializationGradleImportHandler"/>
|
||||||
|
|
||||||
<projectConfigurator implementation="org.jetbrains.kotlin.idea.configuration.KotlinGradleModuleConfigurator"/>
|
<projectConfigurator implementation="org.jetbrains.kotlin.idea.configuration.KotlinGradleModuleConfigurator"/>
|
||||||
<projectConfigurator implementation="org.jetbrains.kotlin.idea.configuration.KotlinJsGradleModuleConfigurator"/>
|
<projectConfigurator implementation="org.jetbrains.kotlin.idea.configuration.KotlinJsGradleModuleConfigurator"/>
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<idea-plugin>
|
||||||
|
<extensions defaultExtensionNs="org.jetbrains.kotlin">
|
||||||
|
<expressionCodegenExtension implementation="org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationCodegenExtension"/>
|
||||||
|
<syntheticResolveExtension implementation="org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationResolveExtension"/>
|
||||||
|
<jsSyntheticTranslateExtension implementation="org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationJsExtension"/>
|
||||||
|
<irGenerationExtension implementation="org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationLoweringExtension"/>
|
||||||
|
</extensions>
|
||||||
|
</idea-plugin>
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
<mavenProjectImportHandler implementation="org.jetbrains.kotlin.allopen.ide.AllOpenMavenProjectImportHandler"/>
|
<mavenProjectImportHandler implementation="org.jetbrains.kotlin.allopen.ide.AllOpenMavenProjectImportHandler"/>
|
||||||
<mavenProjectImportHandler implementation="org.jetbrains.kotlin.noarg.ide.NoArgMavenProjectImportHandler"/>
|
<mavenProjectImportHandler implementation="org.jetbrains.kotlin.noarg.ide.NoArgMavenProjectImportHandler"/>
|
||||||
<mavenProjectImportHandler implementation="org.jetbrains.kotlin.samWithReceiver.ide.SamWithReceiverMavenProjectImportHandler"/>
|
<mavenProjectImportHandler implementation="org.jetbrains.kotlin.samWithReceiver.ide.SamWithReceiverMavenProjectImportHandler"/>
|
||||||
|
<mavenProjectImportHandler implementation="org.jetbrains.kotlinx.serialization.idea.KotlinSerializationMavenImportHandler"/>
|
||||||
<buildSystemTypeDetector implementation="org.jetbrains.kotlin.idea.maven.MavenDetector"/>
|
<buildSystemTypeDetector implementation="org.jetbrains.kotlin.idea.maven.MavenDetector"/>
|
||||||
</extensions>
|
</extensions>
|
||||||
|
|
||||||
|
|||||||
@@ -3101,6 +3101,8 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
|
|||||||
|
|
||||||
<xi:include href="extensions/ide.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
<xi:include href="extensions/ide.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||||
|
|
||||||
|
<xi:include href="kotlinx-serialization.xml" xpointer="xpointer(/idea-plugin/*)"/>
|
||||||
|
|
||||||
<extensionPoints>
|
<extensionPoints>
|
||||||
<xi:include href="extensions/compiler.xml" xpointer="xpointer(/idea-plugin/extensionPoints/*)"/>
|
<xi:include href="extensions/compiler.xml" xpointer="xpointer(/idea-plugin/extensionPoints/*)"/>
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ dependencies {
|
|||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
testRuntime(intellijPluginDep("properties"))
|
testRuntime(intellijPluginDep("properties"))
|
||||||
testRuntime(intellijPluginDep("gradle"))
|
testRuntime(intellijPluginDep("gradle"))
|
||||||
testRuntime(intellijPluginDep("Groovy"))
|
testRuntime(intellijPluginDep("Groovy"))
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ dependencies {
|
|||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
testRuntime(intellijPluginDep("properties"))
|
testRuntime(intellijPluginDep("properties"))
|
||||||
testRuntime(intellijPluginDep("gradle"))
|
testRuntime(intellijPluginDep("gradle"))
|
||||||
testRuntime(intellijPluginDep("Groovy"))
|
testRuntime(intellijPluginDep("Groovy"))
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ dependencies {
|
|||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
testRuntime(intellijPluginDep("properties"))
|
testRuntime(intellijPluginDep("properties"))
|
||||||
testRuntime(intellijPluginDep("gradle"))
|
testRuntime(intellijPluginDep("gradle"))
|
||||||
testRuntime(intellijPluginDep("Groovy"))
|
testRuntime(intellijPluginDep("Groovy"))
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ dependencies {
|
|||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
testRuntime(intellijPluginDep("properties"))
|
testRuntime(intellijPluginDep("properties"))
|
||||||
testRuntime(intellijPluginDep("gradle"))
|
testRuntime(intellijPluginDep("gradle"))
|
||||||
testRuntime(intellijPluginDep("Groovy"))
|
testRuntime(intellijPluginDep("Groovy"))
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ dependencies {
|
|||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
testRuntime(intellijPluginDep("properties"))
|
testRuntime(intellijPluginDep("properties"))
|
||||||
testRuntime(intellijPluginDep("gradle"))
|
testRuntime(intellijPluginDep("gradle"))
|
||||||
testRuntime(intellijPluginDep("Groovy"))
|
testRuntime(intellijPluginDep("Groovy"))
|
||||||
|
|||||||
@@ -42,31 +42,3 @@ If your maven build is failing with Out-Of-Memory errors, set JVM options for ma
|
|||||||
|
|
||||||
MAVEN_OPTS="-Xmx2G"
|
MAVEN_OPTS="-Xmx2G"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Kotlin serialization Gradle Plugin
|
|
||||||
|
|
||||||
First, build all the above. Then run `./gradlew :kotlinx-gradle-serialization-plugin:publishToMavenLocal` to install it to your local maven repository.
|
|
||||||
|
|
||||||
When it is installed in local maven repository, you can add it as a dependency in buildscript classpath and apply it:
|
|
||||||
|
|
||||||
```
|
|
||||||
buildscript {
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenLocal()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.1-SNAPSHOT"
|
|
||||||
classpath "org.jetbrains.kotlinx:kotlinx-gradle-serialization-plugin:0.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'kotlin'
|
|
||||||
apply plugin: 'kotlinx-serialization'
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
You can also obtain it from bintray: https://bintray.com/kotlin/kotlinx/kotlinx.serialization.plugin
|
|
||||||
@@ -16,10 +16,16 @@
|
|||||||
<kotlin.version>1.2-SNAPSHOT</kotlin.version>
|
<kotlin.version>1.2-SNAPSHOT</kotlin.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<groupId>org.jetbrains.kotlinx</groupId>
|
<parent>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-project</artifactId>
|
||||||
|
<version>1.3-SNAPSHOT</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
<artifactId>kotlinx-maven-serialization-plugin</artifactId>
|
<artifactId>kotlinx-maven-serialization-plugin</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>0.7.0-eap-1</version>
|
|
||||||
<description>Serialization plugin for Maven</description>
|
<description>Serialization plugin for Maven</description>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
@@ -138,14 +144,4 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|
||||||
<distributionManagement>
|
|
||||||
<repository>
|
|
||||||
<id>bintray-repo</id>
|
|
||||||
<url>https://api.bintray.com/maven/kotlin/kotlinx/kotlinx.serialization.plugin/</url>
|
|
||||||
</repository>
|
|
||||||
</distributionManagement>
|
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -3,9 +3,6 @@ apply plugin: 'kotlin'
|
|||||||
configureJvmProject(project)
|
configureJvmProject(project)
|
||||||
configurePublishing(project)
|
configurePublishing(project)
|
||||||
|
|
||||||
group = 'org.jetbrains.kotlinx'
|
|
||||||
version = project(':kotlinx-gradle-serialization-plugin').version
|
|
||||||
|
|
||||||
compileJava {
|
compileJava {
|
||||||
sourceCompatibility = 1.8
|
sourceCompatibility = 1.8
|
||||||
targetCompatibility = 1.8
|
targetCompatibility = 1.8
|
||||||
@@ -23,15 +20,10 @@ dependencies {
|
|||||||
|
|
||||||
compileOnly project(':kotlin-stdlib')
|
compileOnly project(':kotlin-stdlib')
|
||||||
compileOnly project(path: ':kotlin-compiler-embeddable', configuration: 'runtimeJar')
|
compileOnly project(path: ':kotlin-compiler-embeddable', configuration: 'runtimeJar')
|
||||||
compileOnly project(':kotlin-allopen-compiler-plugin')
|
|
||||||
|
|
||||||
compileOnly 'org.jetbrains.kotlin:gradle-api:1.6'
|
compileOnly 'org.jetbrains.kotlin:gradle-api:1.6'
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
|
||||||
expand(project.properties)
|
|
||||||
}
|
|
||||||
|
|
||||||
evaluationDependsOn(":kotlinx-serialization-compiler-plugin")
|
evaluationDependsOn(":kotlinx-serialization-compiler-plugin")
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
@@ -40,6 +32,8 @@ jar {
|
|||||||
manifestAttributes(manifest, project)
|
manifestAttributes(manifest, project)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ArtifactsKt.runtimeJar(project, jar, {})
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
archives sourcesJar
|
archives sourcesJar
|
||||||
archives javadocJar
|
archives javadocJar
|
||||||
|
|||||||
@@ -1,18 +1,8 @@
|
|||||||
plugins {
|
|
||||||
id "com.jfrog.bintray" version "1.7.3"
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'kotlin'
|
apply plugin: 'kotlin'
|
||||||
|
|
||||||
configureJvmProject(project)
|
configureJvmProject(project)
|
||||||
configurePublishing(project)
|
configurePublishing(project)
|
||||||
|
|
||||||
group = 'org.jetbrains.kotlinx'
|
|
||||||
version = '0.7.0'
|
|
||||||
if (!project.hasProperty("deploy")) {
|
|
||||||
version = "$version-eap-1"
|
|
||||||
}
|
|
||||||
|
|
||||||
compileJava {
|
compileJava {
|
||||||
sourceCompatibility = 1.8
|
sourceCompatibility = 1.8
|
||||||
targetCompatibility = 1.8
|
targetCompatibility = 1.8
|
||||||
@@ -37,10 +27,6 @@ dependencies {
|
|||||||
|
|
||||||
evaluationDependsOn(":kotlinx-serialization-compiler-plugin")
|
evaluationDependsOn(":kotlinx-serialization-compiler-plugin")
|
||||||
|
|
||||||
processResources {
|
|
||||||
expand(project.properties)
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
from(project(":kotlinx-serialization-compiler-plugin").sourceSets.main.output.classesDirs)
|
from(project(":kotlinx-serialization-compiler-plugin").sourceSets.main.output.classesDirs)
|
||||||
from(project(":kotlinx-serialization-compiler-plugin").sourceSets.main.output.resourcesDir)
|
from(project(":kotlinx-serialization-compiler-plugin").sourceSets.main.output.resourcesDir)
|
||||||
@@ -53,26 +39,3 @@ artifacts {
|
|||||||
archives sourcesJar
|
archives sourcesJar
|
||||||
archives javadocJar
|
archives javadocJar
|
||||||
}
|
}
|
||||||
|
|
||||||
bintray {
|
|
||||||
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
|
|
||||||
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
|
|
||||||
configurations = ['archives']
|
|
||||||
if (!project.hasProperty("deploy")) {
|
|
||||||
dryRun = true
|
|
||||||
}
|
|
||||||
pkg {
|
|
||||||
repo = 'kotlinx'
|
|
||||||
name = 'kotlinx.serialization.plugin'
|
|
||||||
userOrg = 'kotlin'
|
|
||||||
licenses = ['Apache-2.0']
|
|
||||||
vcsUrl = 'https://github.com/JetBrains/kotlin/tree/rr/kotlinx.serialization/libraries'
|
|
||||||
websiteUrl = 'https://github.com/Kotlin/kotlinx.serialization'
|
|
||||||
issueTrackerUrl = 'https://github.com/Kotlin/kotlinx.serialization/issues'
|
|
||||||
|
|
||||||
githubRepo = 'JetBrains/kotlin'
|
|
||||||
version {
|
|
||||||
name = project.version
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+3
-31
@@ -18,17 +18,12 @@ package org.jetbrains.kotlinx.serialization.gradle
|
|||||||
|
|
||||||
import org.gradle.api.Plugin
|
import org.gradle.api.Plugin
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.api.logging.Logger
|
|
||||||
import org.gradle.api.logging.Logging
|
|
||||||
import org.gradle.api.tasks.SourceSet
|
|
||||||
import org.gradle.api.tasks.compile.AbstractCompile
|
import org.gradle.api.tasks.compile.AbstractCompile
|
||||||
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation
|
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation
|
||||||
import org.jetbrains.kotlin.gradle.plugin.KotlinGradleSubplugin
|
import org.jetbrains.kotlin.gradle.plugin.KotlinGradleSubplugin
|
||||||
import org.jetbrains.kotlin.gradle.plugin.SubpluginArtifact
|
import org.jetbrains.kotlin.gradle.plugin.SubpluginArtifact
|
||||||
import org.jetbrains.kotlin.gradle.plugin.SubpluginOption
|
import org.jetbrains.kotlin.gradle.plugin.SubpluginOption
|
||||||
import org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile
|
import org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile
|
||||||
import java.io.FileNotFoundException
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class SerializationGradleSubplugin : Plugin<Project> {
|
class SerializationGradleSubplugin : Plugin<Project> {
|
||||||
companion object {
|
companion object {
|
||||||
@@ -42,13 +37,11 @@ class SerializationGradleSubplugin : Plugin<Project> {
|
|||||||
|
|
||||||
class SerializationKotlinGradleSubplugin : KotlinGradleSubplugin<AbstractCompile> {
|
class SerializationKotlinGradleSubplugin : KotlinGradleSubplugin<AbstractCompile> {
|
||||||
companion object {
|
companion object {
|
||||||
const val SERIALIZATION_GROUP_NAME = "org.jetbrains.kotlinx"
|
const val SERIALIZATION_GROUP_NAME = "org.jetbrains.kotlin"
|
||||||
const val SERIALIZATION_ARTIFACT_NAME = "kotlinx-gradle-serialization-plugin"
|
const val SERIALIZATION_ARTIFACT_NAME = "kotlinx-gradle-serialization-plugin"
|
||||||
const val SERIALIZATION_ARTIFACT_UNSHADED_NAME = "kotlinx-gradle-serialization-plugin-unshaded"
|
const val SERIALIZATION_ARTIFACT_UNSHADED_NAME = "kotlinx-gradle-serialization-plugin-unshaded"
|
||||||
}
|
}
|
||||||
|
|
||||||
private val log = Logging.getLogger(this.javaClass)
|
|
||||||
private val pluginVersion = "0.7.0-eap-1"
|
|
||||||
private var useUnshaded = false
|
private var useUnshaded = false
|
||||||
|
|
||||||
override fun isApplicable(project: Project, task: AbstractCompile): Boolean {
|
override fun isApplicable(project: Project, task: AbstractCompile): Boolean {
|
||||||
@@ -65,36 +58,15 @@ class SerializationKotlinGradleSubplugin : KotlinGradleSubplugin<AbstractCompile
|
|||||||
variantData: Any?,
|
variantData: Any?,
|
||||||
androidProjectHandler: Any?,
|
androidProjectHandler: Any?,
|
||||||
kotlinCompilation: KotlinCompilation?
|
kotlinCompilation: KotlinCompilation?
|
||||||
)
|
): List<SubpluginOption> {
|
||||||
: List<SubpluginOption> {
|
|
||||||
return emptyList()
|
return emptyList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun getPluginArtifact(): SubpluginArtifact {
|
override fun getPluginArtifact(): SubpluginArtifact {
|
||||||
val artifact = if (useUnshaded) SERIALIZATION_ARTIFACT_UNSHADED_NAME else SERIALIZATION_ARTIFACT_NAME
|
val artifact = if (useUnshaded) SERIALIZATION_ARTIFACT_UNSHADED_NAME else SERIALIZATION_ARTIFACT_NAME
|
||||||
return SubpluginArtifact(SERIALIZATION_GROUP_NAME, artifact, pluginVersion)
|
return SubpluginArtifact(SERIALIZATION_GROUP_NAME, artifact)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getCompilerPluginId() = "org.jetbrains.kotlinx.serialization"
|
override fun getCompilerPluginId() = "org.jetbrains.kotlinx.serialization"
|
||||||
}
|
}
|
||||||
|
|
||||||
// taken from KotlinPluginWrapper.kt
|
|
||||||
internal fun Logger.kotlinDebug(message: String) {
|
|
||||||
this.debug("[KOTLIN] $message")
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun Any.findPluginVersion(log: Logger): String {
|
|
||||||
log.kotlinDebug("Loading version information about kotlinx.serialization")
|
|
||||||
val props = Properties()
|
|
||||||
val propFileName = "plugin.properties"
|
|
||||||
val loader = javaClass.classLoader!!
|
|
||||||
val inputStream = loader.getResourceAsStream(propFileName)
|
|
||||||
?: throw FileNotFoundException("property file '$propFileName' not found in the classpath")
|
|
||||||
|
|
||||||
props.load(inputStream)
|
|
||||||
|
|
||||||
val pluginVersion = props["plugin.version"] as String
|
|
||||||
log.kotlinDebug("Found plugin version [$pluginVersion]")
|
|
||||||
return pluginVersion
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
plugin.version=${project.version}
|
|
||||||
@@ -43,6 +43,7 @@ dependencies {
|
|||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
testRuntime(project(":plugins:lint"))
|
testRuntime(project(":plugins:lint"))
|
||||||
testRuntime(intellijPluginDep("junit"))
|
testRuntime(intellijPluginDep("junit"))
|
||||||
testRuntime(intellijPluginDep("IntelliLang"))
|
testRuntime(intellijPluginDep("IntelliLang"))
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ dependencies {
|
|||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
testRuntime(project(":plugins:lint"))
|
testRuntime(project(":plugins:lint"))
|
||||||
testRuntime(intellijPluginDep("junit"))
|
testRuntime(intellijPluginDep("junit"))
|
||||||
testRuntime(intellijPluginDep("IntelliLang"))
|
testRuntime(intellijPluginDep("IntelliLang"))
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ dependencies {
|
|||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
testRuntime(project(":plugins:lint"))
|
testRuntime(project(":plugins:lint"))
|
||||||
testRuntime(intellijPluginDep("junit"))
|
testRuntime(intellijPluginDep("junit"))
|
||||||
testRuntime(intellijPluginDep("IntelliLang"))
|
testRuntime(intellijPluginDep("IntelliLang"))
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ dependencies {
|
|||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
testRuntime(project(":plugins:lint"))
|
testRuntime(project(":plugins:lint"))
|
||||||
testRuntime(intellijPluginDep("junit"))
|
testRuntime(intellijPluginDep("junit"))
|
||||||
testRuntime(intellijPluginDep("IntelliLang"))
|
testRuntime(intellijPluginDep("IntelliLang"))
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ dependencies {
|
|||||||
testRuntime(project(":noarg-ide-plugin"))
|
testRuntime(project(":noarg-ide-plugin"))
|
||||||
testRuntime(project(":allopen-ide-plugin"))
|
testRuntime(project(":allopen-ide-plugin"))
|
||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
testRuntime(project(":plugins:lint"))
|
testRuntime(project(":plugins:lint"))
|
||||||
testRuntime(intellijPluginDep("junit"))
|
testRuntime(intellijPluginDep("junit"))
|
||||||
testRuntime(intellijPluginDep("IntelliLang"))
|
testRuntime(intellijPluginDep("IntelliLang"))
|
||||||
|
|||||||
@@ -5,12 +5,13 @@ plugins {
|
|||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
id("jps-compatible")
|
id("jps-compatible")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jvmTarget = "1.6"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// val compileOnly by configurations
|
|
||||||
// val runtime by configurations
|
|
||||||
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
compileOnly(intellijDep())
|
compileOnly(intellijDep())
|
||||||
compileOnly(intellijPluginDep("maven"))
|
excludeInAndroidStudio(rootProject) { compileOnly(intellijPluginDep("maven")) }
|
||||||
compileOnly(project(":jps-plugin"))
|
compileOnly(project(":jps-plugin"))
|
||||||
compileOnly(project(":compiler:plugin-api"))
|
compileOnly(project(":compiler:plugin-api"))
|
||||||
compileOnly(project(":compiler:frontend"))
|
compileOnly(project(":compiler:frontend"))
|
||||||
@@ -35,10 +36,8 @@ val jar = runtimeJar {
|
|||||||
from(fileTree("$projectDir/src")) { include("META-INF/**") }
|
from(fileTree("$projectDir/src")) { include("META-INF/**") }
|
||||||
}
|
}
|
||||||
|
|
||||||
val serialPluginDir: File by rootProject.extra
|
dist(targetName = the<BasePluginConvention>().archivesBaseName + ".jar")
|
||||||
dist(targetDir = File(serialPluginDir,"lib"), targetName = the<BasePluginConvention>().archivesBaseName.removePrefix("kotlin-") + ".jar")
|
|
||||||
|
|
||||||
ideaPlugin {
|
runtimeJar()
|
||||||
from(jar)
|
|
||||||
rename("^kotlin-", "")
|
ideaPlugin()
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
<idea-plugin url="https://github.com/Kotlin/kotlinx.serialization" >
|
|
||||||
<name>Kotlin-serialization</name>
|
|
||||||
<id>org.jetbrains.kotlinx.serialization</id>
|
|
||||||
<version>0.5.2-SNAPSHOT</version>
|
|
||||||
|
|
||||||
<depends>org.jetbrains.kotlin</depends>
|
|
||||||
<idea-version since-build="172"/>
|
|
||||||
|
|
||||||
<extensions defaultExtensionNs="org.jetbrains.kotlin">
|
|
||||||
<expressionCodegenExtension implementation="org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationCodegenExtension"/>
|
|
||||||
<syntheticResolveExtension implementation="org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationResolveExtension"/>
|
|
||||||
<jsSyntheticTranslateExtension implementation="org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationJsExtension"/>
|
|
||||||
<irGenerationExtension implementation="org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationLoweringExtension"/>
|
|
||||||
|
|
||||||
<gradleProjectImportHandler implementation="org.jetbrains.kotlinx.serialization.idea.KotlinSerializationGradleImportHandler"/>
|
|
||||||
<mavenProjectImportHandler implementation="org.jetbrains.kotlinx.serialization.idea.KotlinSerializationMavenImportHandler"/>
|
|
||||||
</extensions>
|
|
||||||
|
|
||||||
<extensions defaultExtensionNs="com.intellij">
|
|
||||||
<compileServer.plugin classpath="kotlinx-serialization-compiler-plugin.jar"/>
|
|
||||||
</extensions>
|
|
||||||
|
|
||||||
</idea-plugin>
|
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
|
* that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jetbrains.kotlinx.serialization.idea
|
||||||
|
|
||||||
|
import com.intellij.openapi.externalSystem.model.DataNode
|
||||||
|
import com.intellij.openapi.externalSystem.model.project.ModuleData
|
||||||
|
import org.jetbrains.kotlin.idea.configuration.GradleProjectImportHandler
|
||||||
|
import org.jetbrains.kotlin.idea.facet.KotlinFacet
|
||||||
|
import org.jetbrains.plugins.gradle.model.data.GradleSourceSetData
|
||||||
|
|
||||||
|
class KotlinSerializationGradleImportHandler : GradleProjectImportHandler {
|
||||||
|
override fun importBySourceSet(facet: KotlinFacet, sourceSetNode: DataNode<GradleSourceSetData>) {
|
||||||
|
KotlinSerializationImportHandler.modifyCompilerArguments(facet, PLUGIN_GRADLE_JAR)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun importByModule(facet: KotlinFacet, moduleNode: DataNode<ModuleData>) {
|
||||||
|
KotlinSerializationImportHandler.modifyCompilerArguments(facet, PLUGIN_GRADLE_JAR)
|
||||||
|
}
|
||||||
|
|
||||||
|
private val PLUGIN_GRADLE_JAR = "kotlinx-gradle-serialization-plugin"
|
||||||
|
}
|
||||||
-27
@@ -16,38 +16,11 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlinx.serialization.idea
|
package org.jetbrains.kotlinx.serialization.idea
|
||||||
|
|
||||||
import com.intellij.openapi.externalSystem.model.DataNode
|
|
||||||
import com.intellij.openapi.externalSystem.model.project.ModuleData
|
|
||||||
import com.intellij.util.PathUtil
|
import com.intellij.util.PathUtil
|
||||||
import org.jetbrains.idea.maven.project.MavenProject
|
|
||||||
import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments
|
import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments
|
||||||
import org.jetbrains.kotlin.idea.configuration.GradleProjectImportHandler
|
|
||||||
import org.jetbrains.kotlin.idea.facet.KotlinFacet
|
import org.jetbrains.kotlin.idea.facet.KotlinFacet
|
||||||
import org.jetbrains.kotlin.idea.maven.MavenProjectImportHandler
|
|
||||||
import org.jetbrains.kotlinx.serialization.idea.KotlinSerializationImportHandler.modifyCompilerArguments
|
|
||||||
import org.jetbrains.plugins.gradle.model.data.GradleSourceSetData
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
class KotlinSerializationGradleImportHandler : GradleProjectImportHandler {
|
|
||||||
override fun importBySourceSet(facet: KotlinFacet, sourceSetNode: DataNode<GradleSourceSetData>) {
|
|
||||||
modifyCompilerArguments(facet, PLUGIN_GRADLE_JAR)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun importByModule(facet: KotlinFacet, moduleNode: DataNode<ModuleData>) {
|
|
||||||
modifyCompilerArguments(facet, PLUGIN_GRADLE_JAR)
|
|
||||||
}
|
|
||||||
|
|
||||||
private val PLUGIN_GRADLE_JAR = "kotlinx-gradle-serialization-plugin"
|
|
||||||
}
|
|
||||||
|
|
||||||
class KotlinSerializationMavenImportHandler: MavenProjectImportHandler {
|
|
||||||
override fun invoke(facet: KotlinFacet, mavenProject: MavenProject) {
|
|
||||||
modifyCompilerArguments(facet, PLUGIN_MAVEN_JAR)
|
|
||||||
}
|
|
||||||
|
|
||||||
private val PLUGIN_MAVEN_JAR = "kotlinx-maven-serialization-plugin"
|
|
||||||
}
|
|
||||||
|
|
||||||
internal object KotlinSerializationImportHandler {
|
internal object KotlinSerializationImportHandler {
|
||||||
private val PLUGIN_JPS_JAR :String
|
private val PLUGIN_JPS_JAR :String
|
||||||
get() = File(PathUtil.getJarPathForClass(this::class.java)).absolutePath
|
get() = File(PathUtil.getJarPathForClass(this::class.java)).absolutePath
|
||||||
|
|||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
|
* that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jetbrains.kotlinx.serialization.idea
|
||||||
|
|
||||||
|
import org.jetbrains.idea.maven.project.MavenProject
|
||||||
|
import org.jetbrains.kotlin.idea.facet.KotlinFacet
|
||||||
|
import org.jetbrains.kotlin.idea.maven.MavenProjectImportHandler
|
||||||
|
|
||||||
|
class KotlinSerializationMavenImportHandler: MavenProjectImportHandler {
|
||||||
|
override fun invoke(facet: KotlinFacet, mavenProject: MavenProject) {
|
||||||
|
KotlinSerializationImportHandler.modifyCompilerArguments(facet, PLUGIN_MAVEN_JAR)
|
||||||
|
}
|
||||||
|
|
||||||
|
private val PLUGIN_MAVEN_JAR = "kotlinx-maven-serialization-plugin"
|
||||||
|
}
|
||||||
@@ -34,6 +34,7 @@ dependencies {
|
|||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
testRuntime(project(":plugins:android-extensions-ide"))
|
testRuntime(project(":plugins:android-extensions-ide"))
|
||||||
testRuntime(project(":plugins:kapt3-idea"))
|
testRuntime(project(":plugins:kapt3-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
testRuntime(intellijDep())
|
testRuntime(intellijDep())
|
||||||
testRuntime(intellijPluginDep("junit"))
|
testRuntime(intellijPluginDep("junit"))
|
||||||
testRuntime(intellijPluginDep("gradle"))
|
testRuntime(intellijPluginDep("gradle"))
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ dependencies {
|
|||||||
testRuntime(project(":kotlin-scripting-idea"))
|
testRuntime(project(":kotlin-scripting-idea"))
|
||||||
testRuntime(project(":plugins:android-extensions-ide"))
|
testRuntime(project(":plugins:android-extensions-ide"))
|
||||||
testRuntime(project(":plugins:kapt3-idea"))
|
testRuntime(project(":plugins:kapt3-idea"))
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin"))
|
||||||
testRuntime(intellijDep())
|
testRuntime(intellijDep())
|
||||||
testRuntime(intellijPluginDep("junit"))
|
testRuntime(intellijPluginDep("junit"))
|
||||||
testRuntime(intellijPluginDep("gradle"))
|
testRuntime(intellijPluginDep("gradle"))
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ dependencies {
|
|||||||
testRuntime(project(":kotlin-allopen-compiler-plugin")) { isTransitive = false }
|
testRuntime(project(":kotlin-allopen-compiler-plugin")) { isTransitive = false }
|
||||||
testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false }
|
testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false }
|
||||||
testRuntime(project(":kotlin-scripting-compiler")) { isTransitive = false }
|
testRuntime(project(":kotlin-scripting-compiler")) { isTransitive = false }
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin")) { isTransitive = false }
|
||||||
testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false }
|
testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false }
|
||||||
testRuntime(project(":plugins:uast-kotlin"))
|
testRuntime(project(":plugins:uast-kotlin"))
|
||||||
testRuntime(project(":plugins:uast-kotlin-idea"))
|
testRuntime(project(":plugins:uast-kotlin-idea"))
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ dependencies {
|
|||||||
testRuntime(project(":kotlin-allopen-compiler-plugin")) { isTransitive = false }
|
testRuntime(project(":kotlin-allopen-compiler-plugin")) { isTransitive = false }
|
||||||
testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false }
|
testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false }
|
||||||
testRuntime(project(":kotlin-scripting-compiler")) { isTransitive = false }
|
testRuntime(project(":kotlin-scripting-compiler")) { isTransitive = false }
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin")) { isTransitive = false }
|
||||||
testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false }
|
testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false }
|
||||||
testRuntime(project(":plugins:uast-kotlin"))
|
testRuntime(project(":plugins:uast-kotlin"))
|
||||||
testRuntime(project(":plugins:uast-kotlin-idea"))
|
testRuntime(project(":plugins:uast-kotlin-idea"))
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ dependencies {
|
|||||||
testRuntime(project(":kotlin-noarg-compiler-plugin")) { isTransitive = false }
|
testRuntime(project(":kotlin-noarg-compiler-plugin")) { isTransitive = false }
|
||||||
testRuntime(project(":allopen-ide-plugin")) { isTransitive = false }
|
testRuntime(project(":allopen-ide-plugin")) { isTransitive = false }
|
||||||
testRuntime(project(":kotlin-allopen-compiler-plugin")) { isTransitive = false }
|
testRuntime(project(":kotlin-allopen-compiler-plugin")) { isTransitive = false }
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin")) { isTransitive = false }
|
||||||
testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false }
|
testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false }
|
||||||
testRuntime(project(":kotlin-scripting-compiler")) { isTransitive = false }
|
testRuntime(project(":kotlin-scripting-compiler")) { isTransitive = false }
|
||||||
testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false }
|
testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false }
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ dependencies {
|
|||||||
testRuntime(project(":allopen-ide-plugin")) { isTransitive = false }
|
testRuntime(project(":allopen-ide-plugin")) { isTransitive = false }
|
||||||
testRuntime(project(":kotlin-allopen-compiler-plugin")) { isTransitive = false }
|
testRuntime(project(":kotlin-allopen-compiler-plugin")) { isTransitive = false }
|
||||||
testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false }
|
testRuntime(project(":kotlin-scripting-idea")) { isTransitive = false }
|
||||||
|
testRuntime(project(":kotlinx-serialization-compiler-plugin")) { isTransitive = false }
|
||||||
testRuntime(project(":kotlin-scripting-compiler")) { isTransitive = false }
|
testRuntime(project(":kotlin-scripting-compiler")) { isTransitive = false }
|
||||||
testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false }
|
testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false }
|
||||||
testRuntime(project(":plugins:uast-kotlin"))
|
testRuntime(project(":plugins:uast-kotlin"))
|
||||||
|
|||||||
@@ -17,10 +17,9 @@ val intellijUltimateEnabled : Boolean by rootProject.extra
|
|||||||
|
|
||||||
val ideaUltimatePluginDir: File by rootProject.extra
|
val ideaUltimatePluginDir: File by rootProject.extra
|
||||||
val ideaUltimateSandboxDir: File by rootProject.extra
|
val ideaUltimateSandboxDir: File by rootProject.extra
|
||||||
val serialPluginDir: File by rootProject.extra
|
|
||||||
|
|
||||||
if (intellijUltimateEnabled) {
|
if (intellijUltimateEnabled) {
|
||||||
runIdeTask("runUltimate", ideaUltimatePluginDir, ideaUltimateSandboxDir, serialPluginDir) {
|
runIdeTask("runUltimate", ideaUltimatePluginDir, ideaUltimateSandboxDir) {
|
||||||
dependsOn(":dist", ":ideaPlugin", ":ultimate:ideaUltimatePlugin")
|
dependsOn(":dist", ":ideaPlugin", ":ultimate:ideaUltimatePlugin")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user