Enfore looking only for `ivy` or `gradle` metadata when doing resolution This commit uses the `metadataSources` to make sure that when we re-resolve, we only use the expected metadata source. This prevents some tests from accidentally passing because we resolve to Ivy after failing with Gradle.