This repository was archived by the owner on Oct 3, 2025. It is now read-only.
Conversation
679943e to
d4d5436
Compare
yash-garg
approved these changes
Jun 6, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.14.1->0.17.2Release Notes
ZacSweers/MoshiX
v0.17.2Compare Source
2022-05-27
Fix: Fix IR lookups of
setOf()overloads. There are twosetOf()functions with one arg - oneis the vararg and the other is a shorthand for
Collections.singleton(element). It's important wepick the right one, otherwise we can accidentally send a vararg array into the
singleton()function.
Dependency updates:
v0.17.1Compare Source
2022-03-09
Fix: Fix support for nested sealed types that don't use
@JsonClass.v0.17.0Compare Source
2022-02-16
New: moshi-sealed now supports nested sealed subtypes!
In some cases, it's useful to have more than one level of sealed types that share the same label key.
moshi-sealed now supports this out of the box via
@NestedSealedannotation. Simply indicate the nested type with thisannotation.
In this case, now
Failure's subtypes will also participate inResponsedecoding based on thetypelabel key.Caveats:
@DefaultObjectis only supported on direct subtypes.moshi.adapter<Response.Failure>()),you must add the optional
NestedSealed.FactoryJsonAdapter.Factoryto yourMoshiinstance for runtime lookup.Kapt is no longer supported by moshi-sealed
moshi-sealedhas many implementations -kotlin-reflect,kotlinx-metadata, KSP, Java sealed classes, andrecently IR. These are a lot to maintain! To cut down on maintenance, Kapt is no longer supported and has been removed
in this release. Please consider migrating to KSP or Moshi-IR.
Fix: Properly report all originating files in KSP
With Kotlin 1.5.0, sealed types could now exist across multiple files.
moshi-sealed's KSP support previously assumedsingle files when reporting originating elements, and now properly reports all files if sealed types are spread
across multiple files.
v0.16.7Compare Source
2022-02-01
moshi-ir
FilesSubpluginOptionto fix build cache relocatability when generating proguard rules.v0.16.6Compare Source
2022-01-27
moshi-ir
Example failing case would've been something like this:
v0.16.5Compare Source
2022-01-20
Typeconstruction inmoshi-iradapter lookups. Prior to this, we generated IRcode that leveraged
typeOf(), but this appears to be too late to leverage compiler intrinsics support for it andappears to cause some issues if
kotlin-reflectis on the classpath. This should improve runtime performance as aresult.
v0.16.4Compare Source
2022-01-13
implementationrather thanapiwhen applying themoshi-irplugin. #200moshi-ir's proguardrule generation. #201
Thanks to @gpeal for contributing to this release!
v0.16.3Compare Source
2022-01-11
moshi-irrather than incorrectly reuse theoriginal class's parameters. Resolves this issue (that was
originally believed to be a Compose issue).
v0.16.2Compare Source
2022-01-06
generateProguardRulesGradle plugin option correctly.v0.16.1Compare Source
2022-01-06
moshi-irnow supports dynamic generation of proguard rules, bringing it to feature parity with Moshi's existingcode gen.
generateProguardRulesproperty and using the manual rules mentioned in version 0.16.0's notes.
moshi-ir, a newdebugproperty is available in the Gradle extension. It is offby default and can be enabled like below. Please try this out and include its output when reporting issues. Thanks!
v0.16.0Compare Source
2021-12-24
New: moshi-ir
An experimental Kotlin IR implementation of Moshi code gen and moshi-sealed code gen.
The goal of this is to have functional parity with their native Kapt/KSP code gen analogues but run as a fully
embedded IR plugin.
Benefits
lowered directly into bytecode.
reported at the end, rather than failing eagerly with just the first one encountered.
Cons
need to add this manually to your rules if you use R8/Proguard.
proguard rules.
v0.15.0Compare Source
2021-12-10
1.13.0moshi-kspartifact has been upstreamed to Moshi itself as is no longer published.moshi-records-reflectartifact has been upstreamed to Moshi itself as is no longer published.1.6.01.10.2Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.