jeppeman / mockposable

Mocking with Jetpack Compose - stubbing and verification of Composable functions
Apache License 2.0
37 stars 3 forks source link

Unable to build composable metrics when using mockposable #26

Open rizmaulana-astro opened 1 month ago

rizmaulana-astro commented 1 month ago

I use mockposable for roborazzi, everything looks good until I want to generate composable metrics report (https://chrisbanes.me/posts/composable-metrics/). I got this error :

Multiple values are not allowed for plugin option androidx.compose.compiler.plugins.kotlin:metricsDestination

When I remove mockposable plugins the composable metrics works well.

jeppeman commented 1 month ago

Hey @rizmaulana-astro, thanks for reporting. Hmm, that sounds odd. There is certianly no value provided for that plugin option explicitly within mockposable. Could you provide a minimal reproducible example?

rizmaulana-astro commented 1 month ago

Hi @jeppeman This issue happen on version 0.8, here is how to reproduce this issue :

  1. Create new project with compose
  2. Config for composable metrics report https://jayasuryat.github.io/mendable/others/HowToGenerate/
  3. Make sure composable metrics report generated
  4. Then add mockposable dependencies
  5. Re-generate composable metrics report It will get that error message.

Actually the error is gone when I update to version 0.9, unfortunately my project using koltin 1.9.23 and mockposable use kotlin 2.0.0. It will lead to another issue.