Renaming the testsuite name

My goal is to separate the test case results in Jenkins. I have an Android Studio project that produces different flavors, however Jenkins just aggregates them into one pool. I should be able to separate them by changing the name-property of the testsuite field in the xml outputs. Is it possible to change this using Gradle? Either directly or invoking some kind of script that alters the file afters.