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
- 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 partially reverts commit 2baf344f5f,
removing support for K/N embeddable compiler jar from subplugins.
More migration-friendly implementation is to be added instead.
* If a KotlinGradleSubplugin implements
KotlinCompilerPluginSupportPlugin, don't apply it as a legacy plugin
* Add the legacy KotlinGradleSubplugin implementations back so that
when there's JAR hell with META-INF/services in the old artifacts
pointing to the classes, loading the plugins with ServiceLoader (legacy
implementation) from the new artifacts would not fail.
* There's a corner case for plugins not in kotlin-gradle-plugin
If a newer and older version of such a subplugin is used with an older
version of the Kotlin Gradle plugin, the latter will find the META-INF
entries and will try to load the subplugins from the new version. With
the original fix for KT-39809, this would result in silently ignored
empty stub implementations.
Given that the Kotlin Gradle plugin can now check if a subplugin
supports the new API, it's OK to keep the old entries and make the
stub implementations throw a build error when called, so that improper
plugin versions are not ignored and are clearly reported.
Note that this is only necessary for the subplugins not bundled in the
kotlin-gradle-plugin module, as those will always be in sync with the
Kotlin version.
Issue #KT-39809 Fixed
Creating javadocJar task for every project produces lots of unnecessary
tasks, some project don't even have code. Jar task without outDir
property set fails idea import with gradle 5.0+
1. There is no need to specify repositories.
2. We don't use 'org.jetbrains.kotlin:gradle-api:1.6' anymore.
3. kotlin-serialization-unshaded does not need dependencies,
because it does not contain source code (it simply packages jar).
To simplify configuring a `KotlinCompilation` with Gradle Kotlin DSL, it
is essential to expose statically-known types where possible.
This commit parametrizes `KotlinCompilation` with its Kotlin options
type (a subtype of `KotlinCommonOptions`) and adds `kotlinOptions` and
`compileKotlinTask` to `KotlinCompilation`.
(minor) Also reduce the visibility of `attachClassesDir` and
`setupPlugins` to internal, since this API is not for external use.
Kotlin/JVM and Kotlin/JS use shaded compiler, but
Kotlin/Native uses non-shaded one.
Serialization plugin was configured to use either shaded or non-shaded
plugin version, because we used one configuration for resolving
compiler plugins.
This change introduces 'kotlinNativeCompilerPluginClasspath' configuration
for resolving Kotlin/Native compiler plugins.
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
Updated version to 0.5.1
Fix resolving serializers for classes from other modules
(Kotlin/kotlinx.serialization/153)
Respect @SerialName on classes
Add support for @SerialInfo on class-level
Fixed issue when serialDesc property getter was generated, but backing field not.
Respect @Serializable(with=...) on property
Calling 3-arg readElementValue for support of custom contexts
Ability to nest context-based serializer
Migration to 1.2-Beta2
Use polymorphicSerializer prior to default
Don't use polymorphic serializers for all java classes
Docs and maven project update
Remove plugin runtime dependency on stdlib