Skip to content

Consider enabling serialization plugin by default in Kotlin distribution #2797

Open
@qwwdfsad

Description

@qwwdfsad

Currently, kotlinx.serialization requires two components to function -- applied serialization plugin and the runtime JAR added to dependencies.

For newcomers, steepness of the general learning curve and build configuration, two-step procedure seems excessive (moreover, the overall plugin is rather an "implementation detail"), and we much likely can avoid that.

The serialization plugin is already bundled into Kotlin distribution, is released along with Kotlin and is, basically, part of the Kotlin.

I propose enabling it by default for all Kotlin project:

  • For projects without kotlinx-serialization-core in dependencies, the plugin will do nothing and won't contribute to the overall build correctness and performance
  • For projects with serialization in dependencies, it will keep working as is -- looking for the @Serializable annotation by FQN (and other annotations from kotlinx.* package) and transform classes accordingly

Effectively, it won't change the overall build pipelines, but will allow us to get rid of an extra configuration step

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions