autonomousapps / gradle-best-practices-plugin

Gradle Plugin that detects violations of Gradle best practices in Gradle Plugins
Apache License 2.0
181 stars 3 forks source link

Running bestPracticesBaseline twice fails with "Required value was null." #17

Closed TWiStErRob closed 1 year ago

TWiStErRob commented 1 year ago

It seems the serialization is not reversible?

Caused by: java.lang.IllegalStateException: Required value was null.
        at dev.zacsweers.moshix.sealed.reflect.MetadataMoshiSealedJsonAdapterFactory.create(MetadataMoshiSealedJsonAdapterFactory.kt:57)
        at com.squareup.moshi.Moshi.adapter(Moshi.java:145)
        at com.squareup.moshi.Moshi.adapter(Moshi.java:105)
        at com.squareup.moshi.Moshi.adapter(Moshi.java:74)
        at com.squareup.moshi.CollectionJsonAdapter.newArrayListAdapter(CollectionJsonAdapter.java:54)
        at com.squareup.moshi.CollectionJsonAdapter$1.create(CollectionJsonAdapter.java:38)
        at com.squareup.moshi.Moshi.adapter(Moshi.java:145)
        at com.squareup.moshi.Moshi.adapter(Moshi.java:105)
        at com.squareup.moshi.Moshi.adapter(Moshi.java:74)
        at com.autonomousapps.task.CheckBestPracticesTask$Action.execute(CheckBestPracticesTask.kt:228)

I'm running gradlew :plugins:bestPracticesBaseline or gradlew :plugins:checkBestPractices.