Publish 'kotlinx-serialization-compiler-plugin' separately

- Also publish 'kotlinx-serialization-compiler-plugin-embeddable' to be
used with 'kotlin-compiler-embeddable'.
- Now Serialization Maven and Gradle plugins do not embed plugin into
itself, but declare on published one normal dependency.
- 'kotlin-serialization-unshaded' publication is deprecated.

^KT-52811 In Progress
This commit is contained in:
Yahor Berdnikau
2023-04-05 12:09:45 +02:00
committed by Space Team
parent 78c94b65b9
commit a58d6fd13a
8 changed files with 34 additions and 44 deletions
@@ -15,7 +15,7 @@ dependencies {
testApi(commonDependency("junit"))
testApi(projectTests(":kotlin-scripting-compiler")) { isTransitive = false }
testImplementation(project(":kotlin-compiler-embeddable"))
kotlinxSerializationGradlePluginClasspath(project(":kotlin-serialization")) { isTransitive = false }
kotlinxSerializationGradlePluginClasspath(project(":kotlinx-serialization-compiler-plugin.embeddable")) { isTransitive = false }
}
sourceSets {
@@ -24,7 +24,7 @@ sourceSets {
}
projectTest(parallel = true) {
dependsOn(":dist", ":kotlin-serialization:jar")
dependsOn(":dist", ":kotlinx-serialization-compiler-plugin.embeddable:embeddable")
val localKotlinxSerializationPluginClasspath: FileCollection = kotlinxSerializationGradlePluginClasspath
doFirst {
systemProperty("kotlin.script.test.kotlinx.serialization.plugin.classpath", localKotlinxSerializationPluginClasspath.asPath)
@@ -246,8 +246,6 @@ class MainKtsTest {
@Test
fun testHelloSerialization() {
// the embeddable plugin is needed for this test, because embeddable compiler is used.
// furtunately appropriate gradle plugin can serve as an embeddable compiler plugin now
// so, the path to it is prepared in the build file
val serializationPluginClasspath = System.getProperty("kotlin.script.test.kotlinx.serialization.plugin.classpath")!!
val out = captureOut {
val res = evalFileWithConfigurations(