Taste-Based Group Module Dependency Gradle

The problem that I have is that regular

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

not enough app for my purposes. I have a whole list of dependencies with different configurations (and tastes + build types), and now I want to add some method to use these dependencies.

For instance,

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 options with FlavorOnecompiled moduleOnewith configuration typeRelease, and everyone builds varians with FlavorTwoto compile moduleOnewith configuration typeStaging"?

Does anyone know how to do this? Is it possible? I found here how to use type dependencies + assembly type, but it's pretty ugly to have this large list of unnecessary similar dependencies.

Thank!:)

+4

All Articles