4

The problem that I have is that the regular

dependencies {
    compile project(path: ':moduleOne', configuration: "typeRelease")
}

is not enough for my app's purposes. I have quite a list of dependencies with different configurations (and flavors + build types) involved, and what I want to do now is to add some kind of a method to leverage those dependencies.

For example,

dependencies {
    flavorOneAnalyticsCompile project(path: ':moduleOne', configuration: "typeRelease")
    flavorOneFlurryCompile project(path: ':moduleOne', configuration: "typeRelease")
    flavorOneCrashlyticsCompile project(path: ':moduleOne', configuration: "typeRelease")
    flavorTwoAnalyticsCompile project(path: ':moduleOne', configuration: "typeStaging")
    flavorTwoLoggingCompile project(path: ':moduleOne', configuration: "typeStaging")
        }

Is it possible to say "I want all my build variants with FlavorOne to compile moduleOne with typeRelease configuration, and all build varians with FlavorTwo to compile moduleOne with typeStaging configuration"?

Does anybody know how to do it? Is this even possible? I have found here how to use flavor + build type dependencies, but it's quite ugly to have this big fat list of similarly-looking dependencies.

Thanks! :)

Community
  • 1
  • 1
lomza
  • 9,412
  • 15
  • 70
  • 85

0 Answers0