leakcanary
leakcanary copied to clipboard
LeakCanary for JVM tests
When running JVM tests, it'd be nice to be able to use LeakAssertions.assertNoLeaks() and the associated junit test rule. Currently they're implemented in a way that can only run on an Android device, but it should be easy enough to adapt to a JVM.
One key question is whether this should be a single artifact that loads different code at runtime based on the env, or a different artifact. The general API shape and configuration points is likely to be very similar.
Here's an example implementation: https://github.com/cashapp/paparazzi/pull/431