This message was deleted.
# community-support
s
This message was deleted.
d
android
should be available at compile time, unless you're referring to
productFlavors
not being populated? The problem is that product flavors can be declared arbitrarily around one's build; maybe in a plugin, maybe in an obscure build script. To do some computation on the
productFlavors
you should use the
.all
method:
Copy code
task decideWhichTestToRun() {
  android.productFlavors.all {
    // ...
  }
}
Although that doesn't fit your use case. tbcf, your use case may be an edge case. You could do something like this:
Copy code
task decideWhichTestToRun() {
  afterEvaluate {
    // ...
  }
}
But that generally indicates a design error. Ideally you would have tests that always run- and then tests that also run if under a certain flavor.