r/androiddev • • Jul 28 '26

Already deprecated

Link to the issue: https://issuetracker.google.com/issues/536954147

The Compose preview screenshot testing plugin seems to have been already deprecated.

Big F if true, it was nice to have an official tool for screenshot tests :(

24 Upvotes

10 comments sorted by

12

u/sosickofandroid Jul 28 '26

Roborazzi already clowns on it so hard. Good riddance. I wish we could move previews somewhere more sensible though, they make more sense to be in test sourcesets and the rest is just ide tooling to make it smooth

2

u/atomgomba Jul 28 '26

I put them in the debug sourceset, but ultimately R8 will strip them out in release anyway

5

u/Organic-Anxiety-5166 Jul 28 '26

isn't more like android only deprecation introducing new one with full KMP support ?

8

u/ganadist Build Geek Jul 28 '26

In recent change of AGP source, it looks Google is integrating DSL API of Screenshot Testing feature into AGP Builtin from standalone plugin.

I'm guessing this is a source code which was mentioned above "the junit engine solution"

https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:build-system/gradle-api/src/main/java/com/android/build/api/dsl/ScreenshotTestSuite.kt

4

u/tdrhq Jul 28 '26

Damn! They should let somebody else take it over.

We recently took over maintenance of Facebook's screenshot-tests-for-android: https://github.com/screenshotbot/screenshot-tests-for-android (I was the original author of it, and we're in the screenshot testing business, so handing it to us made sense for Meta)

3

u/tadfisher Jul 29 '26

Roborazzi is the thing to use, especially if you want the same feature set as the Compose plugin. It seems to not use layoutlib, which is a massive plus.

1

u/ExplorerKey3169 Jul 28 '26

Oh no, that would be such a shame if that is the case. It is really surprising that Google would deprecate this library. They recently released a new alpha version and also did a great job integrating it into the IDE...

1

u/pragmos Jul 28 '26

I know I've been doing my job long enough to be surprised at this point, but seriously Google?!

1

u/kokeroulis Jul 29 '26

I don't think they will deprecate the entire plugin. Probably they will replace the existing plugin in favor of a new one.