Luke B.
Luke B.

Reputation: 137

How many flavor dimensions is too many? Build time increased 6x after adding 5th dimension

I have an android project with 4 flavor dimensions:

flavorDimensions =  ["authorization","customer","mediaSecurity","environment"]
productFlavors{
   ...
}

Runs fine, builds in 2 minutes.

I had the need to add one more, and noticed that as soon as I add one more dimension (and of course 2 flavors related to that dimension), build times become more than 6x what was before, at least 12 minutes every time I build or change flavor, for any change at all. If I remove them, it goes back to building in 2 minutes.

I tried adding some optimizations for slow build times I found here and there, but to no avail. I found nothing about problems related to using too many dimensions.

I still have to try using 5 dimensions on a new empty project, but it sure sounds absurd that build times went from 2 to 12 minutes just by adding one. As well as the thought that I can be the first one using 5 dimensions.

Is there something helpful to know to solve the problem? Thank you.

Upvotes: 0

Views: 38

Answers (0)

Related Questions