Gradle根據引數配置不同的依賴

趙小龍_同學發表於2020-11-19

Gradle根據引數配置不同的依賴 https://zhuanlan.zhihu.com/p/86118527

dependencies {
    implementation 'com.android.support:appcompat-v7:26.0.2'
    implementation 'com.android.support:design:26.0.2'

    if ("${rootProject.ext.isUploadMaven}" == ("false")) {
        api project(':baselib.commLib')
        implementation project(':baselib.baseLib')
        implementation project(':lib.cloudRoom')
        implementation project(':lib.cloudRoomBase')
    } else {
        api "com.yimi.room.sdk:commLib:${rootProject.ext.publishVersion}"
        implementation "com.yimi.room.sdk:baseLib${rootProject.ext.publishVersion}"
        implementation "com.yimi.room.sdk:cloudRoom:${rootProject.ext.publishVersion}"
        implementation "com.yimi.room.sdk:cloudRoomBase:${rootProject.ext.publishVersion}"
    }
}

 

相關文章