apply plugin: 'com.android.library'

android {
    compileSdkVersion rootProject.ext.android.compileSdkVersion

    defaultConfig {
        minSdkVersion rootProject.ext.android.minSdkVersion
        targetSdkVersion rootProject.ext.android.targetSdkVersion
        versionCode rootProject.ext.android.versionCode
        versionName rootProject.ext.android.versionName
    }
    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
            if (isModule.toBoolean()) {
            } else {
                resources {
                    //正式版本时，排除debug文件夹下所有调试文件
                    exclude 'src/debug/*'
                }
            }
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    api fileTree(include: ['*.jar'], dir: 'libs')
    api rootProject.ext.support["appcompat-v7"]

    //network
    api rootProject.ext.dependencies.okhttp
    api rootProject.ext.dependencies.retrofit
    api rootProject.ext.dependencies["converter-gson"]
    api rootProject.ext.dependencies["adapter-rxjava"]
    api rootProject.ext.dependencies["logging-interceptor"]

    //json解析
    api rootProject.ext.dependencies.gson

    //rx管理View的生命周期
    api(rootProject.ext.dependencies.rxlifecycle) {
        exclude group: 'com.android.support'
    }
    api(rootProject.ext.dependencies["rxlifecycle-components"]) {
        exclude group: 'com.android.support'
    }
}
