Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement support for KotlinX Serialization #196

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Feb 21, 2024

  1. Fix dropped implementSerializable flag

    Fixes and closes apple#191
    
    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    a89e910 View commit details
    Browse the repository at this point in the history
  2. Add setting for Kotlin package to codegen

    Adds a setting to the Kotlin code generator which controls the
    target Kotlin package for codegen. Applied as a prefix to the
    normal generated package name.
    
    The current versions of the `kotlinx.serialization` and
    `kotlinx.html` libraries are declared dynamically, which causes
    a failure when refreshing dependencies. To avoid Kotlin metadata
    build issues, these have been pinned.
    
    - feat(codegen): use `kotlinPackage` as prefix for kotlin codegen
    - feat(gradle): `kotlinPackage` property in gradle plugin
    - test(codegen): add tests for custom kotlin package
    - test(gradle): add tests for generating with custom kotlin package
    
    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    e9638dd View commit details
    Browse the repository at this point in the history
  3. Implement support for KotlinX Serialization

    This change adds support for a new code-gen argument,
    `implementKSerializable`, which results in the annotation
    `kotlinx.serialization.Serializable` being added to `data`
    classes during codegen.
    
    Relates to discussion apple#185
    
    - feat(codegen): add support for kotlin `Serializable` annotation
    - feat(gradle): add `implementKSerializable` argument
    - test(codegen): add test for KotlinX serialization support
    - test(codegen): add test for both Java and KotlinX serialization
    - test(gradle): add test for compiling with KotlinX serialization
    
    Signed-off-by: Sam Gammon <sam@elide.ventures>
    sgammon committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    a1613a1 View commit details
    Browse the repository at this point in the history