Commit Graph

15 Commits

Author SHA1 Message Date
Steven Schäfer 05da65654e Parcelize: Enable warnings in tests 2021-10-26 17:06:18 +02:00
Steven Schäfer 00134fddf9 Parcelize: Allow Parcelize annotation on sealed classes
See https://issuetracker.google.com/177856520
2021-09-28 22:16:33 +02:00
Steven Schäfer cb46a56815 Parcelize: Support unsigned array types
See https://issuetracker.google.com/200774823
2021-09-22 13:42:04 +02:00
Steven Schäfer 2501013012 Parcelize: Support ShortArray
ShortArrays are broken in the Parcelize JVM backend, which caused a
frontend error on the JVM IR backend.
2021-09-22 13:42:04 +02:00
Steven Schäfer fc013c6b9f Parcelize: Add an intrinsic to access Parcelable CREATOR fields
Fixes KT-19853.

The CREATOR field is a static field on a Parcelable class which is not
visible from Kotlin since the necessary metadata would have to be in a
Companion object which may not exist.

This commit adds a [parcelableCreator] function to kotlinx.parcelize,
which is optimized to a direct field access whenever possible.
2021-09-21 15:09:39 +02:00
Steven Schäfer b2e6e075ab Parcelize: Fix diagnostics for parcelable value classes 2021-08-31 02:48:03 +02:00
Steven Schäfer 9fd777cb7d Parcelize: Add support for unsigned types on the IR backend 2021-08-27 21:28:31 +02:00
Steven Schäfer 2f7bc8ca79 Parcelize: Add tests for parcelable value classes 2021-08-27 21:26:46 +02:00
Steven Schäfer 0bbb36e765 Parcelize: Add tests for obsolete issues 2021-08-27 21:26:46 +02:00
Steven Schäfer bf7db84451 Parcelize: Handle class hierarchies of Parcelers (KT-46567) 2021-05-18 18:52:15 +02:00
Andrey Zinovyev 95140f35f8 [parcelize] Fix codegen for generic classes
Replace type arguments with star projection in static methods
Fix IR function generation

^KT-42652  Fixed
2021-02-04 15:11:51 +03:00
Yan Zhulanow e83a3c3f27 Parcelize: Use @Parcelize annotations from Android Extensions instead of the copied&deprecated ones (KT-42342, KT-43150)
Dex can't merge class files from both android-extensions-runtime and parcelize-runtime, so we have to keep only one copy of each class.
Instead of @Deprecated annotations, there are new diagnostics (without quick-fixes yet).
The goal is to allow simple usages (@Parcelize alone) but forbid kotlinx.android.synthetic.Parceler usage.
2020-11-11 04:25:07 +09:00
Steven Schäfer 714d17ac63 Parcelize, JVM IR: Handle star projected and nullable arrays. 2020-10-06 17:42:35 +02:00
Yan Zhulanow 2d158ffebd Parcelize: Add tests for deprecated (kotlinx.android.parcel) annotations 2020-09-24 15:50:59 +09:00
Yan Zhulanow b7796d63d8 Parcelize: Add the Parcelize compiler plugin with sources extracted from Android Extensions plugin (KT-40030) 2020-09-24 15:50:57 +09:00