ZacSweers / MoshiX

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

Fix generated Proguard rules not using valid fully qualified name #626

Closed mhelder closed 3 months ago

mhelder commented 3 months ago

This PR fixes https://github.com/ZacSweers/MoshiX/issues/624.

KotlinPoet's ClassName.toString() does not yield a valid fully qualified path for e.g. nested classes, or when backticks are used in the package name to escape reserved keywords. Instead, ClassName.reflectionName() should be used for that.

☝️ This is the only functional change.

The other changes in this PR are:

Thanks to @sav007 for the hint in https://github.com/ZacSweers/MoshiX/issues/415#issuecomment-1513553223

ZacSweers commented 3 months ago

You need to run spotless locally - ./gradlew spotlessApply --no-configuration-cache

mhelder commented 3 months ago

Done!

ZacSweers commented 3 months ago

Unfortunately looks like there's failing tests

mhelder commented 3 months ago

Ah sorry, my bad, I overlooked one existing test. Have pushed a fix, and this time ran the full test suite to make sure everything passes.

ZacSweers commented 3 months ago

Can you push one more (empty) commit to re-trigger CI? Looks like github had an outage when you pushed

ZacSweers commented 3 months ago

Thanks!