ZacSweers / MoshiX

Extensions for Moshi including IR plugins, moshi-sealed, and more.
Apache License 2.0
514 stars 37 forks source link

Reimplement proguard rule gen in KSP #457

Closed ZacSweers closed 1 year ago

ZacSweers commented 1 year ago

This reorganizes proguard rule generation to run in its own KSP SymbolProcessor. This allows it to be reused by both moshi-sealed KSP and moshi-ir, while also solving K2 support for the latter and avoiding Kotlin IC issues.

For moshi-sealed KSP, it just depends on the processor and should run it automatically with no changes.

For moshi-ir, proguard rule gen in the gradle extension will now seek to configure and apply the KSP plugin. This requires the KSP plugin to be on the buildscript classpath now in order to enable it.

Resolves #446