apply plugin: 'com.android.library'
apply plugin: 'realm-android'
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
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        javaCompileOptions {
            annotationProcessorOptions {
                includeCompileClasspath = true
            }
        }
    }
    lintOptions {
        abortOnError false
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        release {
            minifyEnabled false
        }
        // 注意这里，跟第一点的 raedebugCompile project的configuration要匹配。
        zj_release {
            initWith release
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    //    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
    //        exclude group: 'com.android.support', module: 'support-annotations'
    //    })
    compile rootProject.ext.dependencies.appcompatV7
    compile rootProject.ext.dependencies.recyclerviewV7
    compile rootProject.ext.dependencies.design
    compile rootProject.ext.dependencies.cardviewV7
    compile rootProject.ext.dependencies.supportV4
    compile rootProject.ext.dependencies.constraint
    //Log日志打印库
    compile rootProject.ext.dependencies.xlog
    //网络请求库
    compile rootProject.ext.dependencies.okgo
    //九宫格图片
    compile rootProject.ext.dependencies.ninegridview
    //图片框架
    compile rootProject.ext.dependencies.glide
    annotationProcessor rootProject.ext.dependencies.compiler
    compile rootProject.ext.dependencies.transformations
    //为"单Activity ＋ 多Fragment","多模块Activity + 多Fragment"架构而生,替代官方fragment
    compile rootProject.ext.dependencies.fragmentation
    //事件总线 eventBus
    compile rootProject.ext.dependencies.eventbus
    //透明状态栏导航栏、沉浸式状态栏导航栏的终极解决方案
    compile(rootProject.ext.dependencies.statusbarutil) {
        exclude group: 'com.android.support' //exclude 可以解决 lib冲突的问题。
    }
    /*时间轴*/
    compile rootProject.ext.dependencies.poweradapter
    //RecyclerView的强大的BaseAdapter
    compile rootProject.ext.dependencies.BaseRecyclerViewAdapterHelper
    compile rootProject.ext.dependencies.fastjson
    compile rootProject.ext.dependencies.gson
    compile rootProject.ext.dependencies.Toasty
    /*沉浸式状态栏*/
//    compile rootProject.ext.dependencies.barlibrary
    /*启动的粒子动画*/
    compile rootProject.ext.dependencies.ParticleView
    /*底部导航栏*/
    compile rootProject.ext.dependencies.JPTabBar
    /*Android智能下拉刷新框架*/
    compile rootProject.ext.dependencies.SmartRefreshLayout
    compile rootProject.ext.dependencies.SmartRefreshHeader
    /*ViewPagerIndicator 导航*/
    compile rootProject.ext.dependencies.ViewPagerIndicator
    /*Spinner*/
    compile rootProject.ext.dependencies.Spinner
    //拍照添加图片库
    compile rootProject.ext.dependencies.takephoto
    /*视频拍摄库*/
    compile rootProject.ext.dependencies.LandscapeVideoCamera
    /*涂鸦库*/
    compile rootProject.ext.dependencies.graffiti
    /*权限管理库*/
    compile rootProject.ext.dependencies.hipermission
    compile rootProject.ext.dependencies.permission
    /*apk更新库*/
    compile rootProject.ext.dependencies.updateplugin
    /*视频播放器*/
    compile rootProject.ext.dependencies.gsyVideoPlayer
    /*日期选择器*/
    compile rootProject.ext.dependencies.TimePickerDialog

    /*图片选择*/
    compile rootProject.ext.dependencies.PictureSelector
    /*腾讯云精简版*/
    compile (rootProject.ext.dependencies.cosxmlLite){
        // 增加这行
        exclude group: 'com.tencent.qcloud', module: 'beacon-android-release'
    }



    compile 'com.android.support:multidex:1.0.3'
    testImplementation 'junit:junit:4.12'
    api files('libs/zxing_core_3.0.1.jar')
}
configurations.all {
    resolutionStrategy.eachDependency { details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                //这里写你想统一的版本是多少，前提是你sdk里有
                details.useVersion '27.0.1'
            }
        }
    }
}