I would like to take the chance to expose a problem that we are facing at the moment and I am wondering if you ever thought about integrating or giving the chance to not just run Espresso but also a Screenshot testing library on top of it.
What I mean with "not only Espresso", is having the ability to not just run the Espresso tests with the ".jar file" that you provide but also run different gradle tasks either passed by parameters or with different flags.
My guess is that you either run the gradle taskconnectedAndroidTest in order to run the tests specified in the parameters when running the jar file or you do it manually with adb, but either way I am wondering if there is a chance to run more gradle tasks on top of it, in this case is one gradle task that not only runs the espresso tests but also pulls the screenshots out of the device and compares them.
Our use case would be to run this in the pipeline to get the results not only for the espresso but also for the screenshot tests.
The library that we are using is : https://github.com/Karumi/Shot/And the gradle task that we would like to run in saucelabs potentially is the following : ./gradlew executeScreenshotTests -pRecord