android gradle编译 多个flavor中加载不同的android library的flavor

Library build.gradle:


apply plugin: 'com.android.library'

android {        
    ....
    publishNonDefault true
    productFlavors {
        market1 {}
        market2 {}
    }
}

project build.gradle:



apply plugin: 'com.android.application'

android {
    ....
    productFlavors {
        market1 {}
        market2 {}
    }
}

dependencies {
    ....
    market1Compile project(path: ':lib', configuration: 'market1Release')
    market2Compile project(path: ':lib', configuration: 'market2Release')
}



转自:https://stackoverflow.com/questions/24860659/multi-flavor-app-based-on-multi-flavor-library-in-andro

猜你喜欢

转载自blog.csdn.net/jyfjyt/article/details/72956596
今日推荐