Publish serialization plugin as kotlin-serialization-compiler-plugin

With this change it will have consistent naming with other compiler plugins.

'-embeddable' was also renamed.

'dist' should contain two identical jar files:
- 'serialization-compiler-plugin.jar'
- 'kotlinx-serialization-compiler-plugin.jar'

^KT-58530 In Progress
This commit is contained in:
Yahor Berdnikau
2023-05-09 22:47:48 +02:00
committed by Space Team
parent bc7b1094c3
commit eef7c3e834
7 changed files with 67 additions and 8 deletions
+25 -2
View File
@@ -72,14 +72,37 @@ sourceSets {
optInToExperimentalCompilerApi()
publish()
publish {
artifactId = artifactId.replace("kotlinx-", "kotlin-")
}
runtimeJar()
val runtimeJar = runtimeJar {
archiveBaseName.set("kotlin-serialization-compiler-plugin")
}
sourcesJar()
javadocJar()
testsJar()
useD8Plugin()
val distCompat by configurations.creating {
isCanBeResolved = false
isCanBeConsumed = true
}
val compatJar = tasks.register<Copy>("compatJar") {
from(runtimeJar)
into(layout.buildDirectory.dir("libsCompat"))
rename {
it.replace("kotlin-", "kotlinx-")
}
}
artifacts {
add(distCompat.name, compatJar) {
builtBy(runtimeJar, compatJar)
}
}
projectTest(parallel = true, jUnitMode = JUnitMode.JUnit5) {
workingDir = rootDir
useJUnitPlatform()
@@ -7,7 +7,7 @@ dependencies {
}
publish {
artifactId = artifactId.replace(".", "-")
artifactId = artifactId.replace(".", "-").replace("kotlinx-", "kotlin-")
}
runtimeJar(rewriteDefaultJarDepsToShadedCompiler())