Get AndroidTest code coverage in AndroidStudio 3.0

I have most of the test of my project in the AndroidTest folder instead of Test because they need to use a lot of Db methods and because my colleagues decided to put them there. Now I can't move them because they'll stop working. But I need to get the code coverage of said tests...

Is there any way to enable code coverage for test under AndroidTest folder? I've been looking but none of the solutions I found work for me.

Note that I also have some Espresso tests that I'd like to get coverage to if it is possible.