Skip to content

Releases: ZacSweers/MoshiX

0.27.1

28 May 21:19
Compare
Choose a tag to compare
  • [moshi-sealed] Improve moshi-sealed KSP error messages.
  • [moshi-ir] Fix fallback adapter support in IR code gen not recognizing Moshi parameters to primary constructors.
  • [moshi-sealed and moshi-ir] Check for same subtypes before erroring on duplicate labels in moshi-sealed IR.
  • [moshi-proguard-rule-gen] Fix proguard rule gen not capturing non-sealed subtypes.
  • [moshi-proguard-rule-gen] Don't write empty proguard rule files if not rules were necessary.
  • Update KotlinPoet to 1.17.0.

What's Changed

  • Update plugin moshix to v0.27.0 by @renovate in #596
  • Update kotlinpoet to v1.17.0 by @renovate in #598
  • Update dependency org.assertj:assertj-core to v3.26.0 by @renovate in #599
  • Update plugin lint to v8.6.0-alpha03 by @renovate in #597
  • Update kotlinCompileTesting to v0.5.0-alpha08 by @renovate in #595
  • Fix fallback adapter support in IR code gen not recognizing Moshi parameters to primary constructors by @ZacSweers in #600
  • Improve moshi-sealed KSP error messages by @ZacSweers in #601
  • Check for same subtypes before erroring on duplicate labels by @ZacSweers in #602
  • Fix proguard rule gen not capturing non-sealed subtypes. by @ZacSweers in #603

Full Changelog: 0.27.0...0.27.1

0.27.0

22 May 20:22
Compare
Choose a tag to compare

Update to K2

This release updates to K2, aka Kotlin 2.0.0. This also builds against KSP 2.0.0-1.0.21.

  • [moshi-metadata-reflect] Update to stable kotlin metadata API that ships in K2. The new transitive dependency is now org.jetbrains.kotlin:kotlin-metadata-jvm:2.0.0.
  • [ksp] All KSP processors are tested against both KSP 1 and the in-beta KSP2.
  • [moshi-ir] Support K2 IR API changes. We may explore building out FIR support for better IDE support in the future, but for now the entire implementation remains in an IR-only plugin.

What's Changed

Full Changelog: 0.26.0...0.27.0

0.26.0

12 May 19:41
Compare
Choose a tag to compare

New: Publish a new moshi-immutable-adapters artifact with support for kotlinx.collections.immutable.

Gradle dependency

dependencies {
  implementation("dev.zacsweers.moshix:moshi-immutable-adapters:<version>")
}

In code

val moshi = Moshi.Builder().add(ImmutableCollectionsJsonAdapterFactory()).build()

Supported types

  • ImmutableCollection
  • ImmutableList
  • ImmutableSet
  • ImmutableMap
  • PersistentCollection
  • PersistentList
  • PersistentSet
  • PersistentMap

Misc

  • Omit the stdlib from transitive dependencies on the compiler plugin and Gradle plugin artifacts. Both kotlinc and Gradle impose their own versions on the classpath.
  • Update Moshi to 1.15.1.
  • Update kotlinx-metadata to 0.9.0.
  • Update KotlinPoet to 1.16.0.
  • Update Kotlin to 1.9.24.
  • Update KSP to 1.9.24-1.0.20.
  • Update Guava to 33.2.0-jre.
  • Compile against Gradle 8.7.

What's Changed

Full Changelog: 0.25.1...0.26.0

0.25.1

27 Nov 16:02
Compare
Choose a tag to compare
  • Update to Kotlin 1.9.21.
  • Update to KSP 1.9.20-1.0.14.
  • Update to KotlinPoet 1.15.1.

What's Changed

Full Changelog: 0.25.0...0.25.1

0.25.0

31 Oct 20:33
Compare
Choose a tag to compare
  • Update to Kotlin 1.9.20. moshi-ir now requires Kotlin 1.9.20.
  • Update to KSP 1.9.20-1.0.13.
  • Update to Guava 32.1.3-jre.
  • Build against Gradle 8.4.

What's Changed

Full Changelog: 0.24.3...0.25.0

0.24.3

06 Sep 18:22
Compare
Choose a tag to compare
  • Fix: Enable KSP proguard rule gen again in moshi-ir. We accidentally encountered a bug in KSP and work around it now.

What's Changed

Full Changelog: 0.24.2...0.24.3

0.24.2

03 Sep 19:31
Compare
Choose a tag to compare
  • Fix: Use correct platform-specific configuration for applying KSP dependency in moshi-ir.
  • Fix: Don't enable moshi-ir/ksp on non-JVM/Android platforms until they're supported upstream.

What's Changed

Full Changelog: 0.24.1...0.24.2

0.24.1

03 Sep 03:10
Compare
Choose a tag to compare
  • Fix: Use correct name for each KotlinCompilation's implementation configuration in KMP projects. Note that Moshi still only supports JVM/Android.
  • Update to Kotlin 1.9.10.
  • Update to KSP 1.9.10-1.0.13.
  • Compile against Gradle 8.3.
  • Remove shaded anvil-compiler-utils dependency from moshi-ir.

What's Changed

Full Changelog: 0.24.0...0.24.1

0.24.0

22 Jul 20:25
Compare
Choose a tag to compare

New: Move proguard rule generation to a standalone KSP processor.

This is necessary in order to support both K2 and avoid incremental compilation issues in Kotlin 1.9.x.

For moshi-sealed KSP users, there should be no changes necessary.

For moshi-ir users, you must now apply the KSP gradle plugin as well as the moshix plugin. MoshiX's gradle plugin does not directly declare a transitive dependency on the KSP plugin to avoid Gradle classloader conflicts.

plugins {
  // Other plugins
  id("dev.zacsweers.moshix") version "x.y.z"
+  id("com.google.devtools.ksp") version "x.y.z"
}

If you don't want this or don't need proguard rule generation, you can opt out by setting the moshix.generateProguardRules gradle property to false.

  • Update KSP to 1.9.0-1.0.12.
  • Update KotlinPoet to 1.14.2.
  • Update to kotlinx-metadata 0.7.0.
  • Update to Guava 32.1.1-jre.

What's Changed

New Contributors

Full Changelog: 0.23.0...0.24.0

0.24.0-RC2

20 Jul 16:58
Compare
Choose a tag to compare
0.24.0-RC2 Pre-release
Pre-release
  • Fix: Write generated proguard rules to the correct resources path.