Collect the dependencies from the variants and not the buildTypes

The Android-gradle API changed, this works around it. It's still pretty
bruteforce and I'm also ignoring variantDependency.getLocalDependency().

Lightly tested fix for builds on 0.5.