testfairy/testfairy-gradle-plugin — pull request #3 by antonyt (2014-03-03 07:00:16+00:00)
Title: Add support for product flavors

Currently, there is no support for projects with multiple product flavors. We can reproduce the issue easily by adding some dummy flavors to `build.gradle` of an arbitrary project:

android {
...
productFlavors {
flavorA {}
flavorB {}
}
...
}

In this case, no `testfairyXXX` tasks will be created. The plugin will fail to find the package tasks - there will be no task called `packageDebug`, instead there will be tasks called `packageFlavorADebug` and `packageFlavorBDebug`.

We can fix this issue by iterating through `applicationVariants` instead. This works even if `productFlavors` are not customized. I also modified the script to use the signing config directly from the variant.