apply plugin: 'com.android.library'

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    defaultConfig {
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

//        ndk {
//            abiFilters  'armeabi-v7a'//,'armeabi',, 'arm64-v8a', 'x86'
//        }

        //Api
        buildConfigField('String', 'FACEBOOK_APP_ID', "\"${facebook_app_id}\"")
        buildConfigField('String', 'ACCOUNT_KIT_CLIENT_TOKEN', "\"${account_kit_client_token}\"")

        try {
            buildConfigField 'Boolean', 'NEED_CONTACT', "${contact}"
        } catch (Exception e) {
            buildConfigField 'Boolean', 'NEED_CONTACT', "true"
        }
        
        try {
            buildConfigField 'Boolean', 'HIBERNATION', "${hibernation}"
        } catch (Exception e) {
            buildConfigField 'Boolean', 'HIBERNATION', "false"
        }


        try {
            buildConfigField 'Boolean', 'IS_HOST_APP', "${host_app}"
        } catch (Exception e) {
            buildConfigField 'Boolean', 'IS_HOST_APP', "false"
        }

    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
    }

    repositories {
        flatDir {
            dirs 'libs'
        }
    }
    compileOptions {
        targetCompatibility 1.8
        sourceCompatibility 1.8
    }
}

repositories {
    mavenCentral()
}

dependencies {
    api fileTree(dir: 'libs', include: ['*.jar'])
    testImplementation 'junit:junit:4.12'
    // multidex
    api 'com.android.support:multidex:1.0.3'
    api 'com.android.support:multidex-instrumentation:1.0.3'

    // 字符串资源替换
    implementation 'com.jcminarro:Philology:1.0.1'
    implementation 'io.github.inflationx:viewpump:1.0.0'

    //support包
    //noinspection GradleCompatible
    api "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion"
    api "com.android.support:support-v4:$rootProject.ext.supportLibraryVersion"
    api "com.android.support:recyclerview-v7:$rootProject.ext.supportLibraryVersion"
    api "com.android.support:design:$rootProject.ext.supportLibraryVersion"

    //walle
    api 'com.meituan.android.walle:library:1.1.6'

    // protobuf
    api "com.google.protobuf:protobuf-java:3.5.1"
    // stream
    api 'com.annimon:stream:1.1.4'

//  api 'me.jessyan:autosize:1.0.6'

    //同盾
    compileOnly(name: 'android_spirit-20190220-2.0.0.1', ext: 'aar')

    //bugly
    compileOnly 'com.tencent.bugly:crashreport:3.0.0'

    api(name: 'libfbref-release', ext: 'aar')


    //QMUI
    api 'com.qmuiteam:qmui:1.1.10'

    //Eventbus
    api 'org.greenrobot:eventbus:3.0.0'

    //SmartRefresh
    api 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-alpha-14'
    api 'com.scwang.smartrefresh:SmartRefreshHeader:1.1.0-alpha-14'//没有使用特殊Header，可以不加这行

    //Gson
    api 'com.google.code.gson:gson:2.8.2'

    //rxjava
    api 'com.jakewharton.rxbinding2:rxbinding:2.2.0'
    api 'io.reactivex.rxjava2:rxandroid:2.1.0'
    //rxpermissions
    api 'com.github.tbruyelle:rxpermissions:0.10.2'
    //rxLifrCycle
    api 'com.trello.rxlifecycle2:rxlifecycle-components:2.1.0'

    // glide
    api "com.github.bumptech.glide:glide:3.7.0"

    //retrofit
    api 'com.squareup.retrofit2:retrofit:2.4.0'
    api 'com.squareup.retrofit2:converter-gson:2.4.0'
    api 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'

//    firebase core
//    api 'com.google.firebase:firebase-core:16.0.3'
//    firebase cloud message
//    api 'com.google.firebase:firebase-messaging:17.3.2'
    //firebase remoteConfig
//    api 'com.google.firebase:firebase-config:16.0.0'

    api 'com.android.installreferrer:installreferrer:1.0'

//    api 'com.google.android.gms:play-services-auth:15.0.1'
//    api 'com.google.android.gms:play-services-auth-api-phone:15.0.1'
//    api 'com.google.android.gms:play-services-ads:15.0.1'

    //    api 'com.google.android.gms:play-services-analytics:17.0.0'

    //facebook accountKit SDK
    api 'com.facebook.android:account-kit-sdk:5.+'


    //SDK-FACEBOOK-START
    api 'com.facebook.android:facebook-android-sdk:5.5.1'
    //SDK-FACEBOOK-END

    //AppsFlyer
//    api 'com.appsflyer:af-android-sdk:4+@aar'

    //zendesk
//    api group: 'com.zendesk', name: 'support', version: '2.1.1'
    api 'com.google.code.findbugs:jsr305:3.0.2'
    compileOnly project(':cash_plugin_toolbox')
}
