apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion '28.0.3'

    defaultConfig {
        applicationId "com.easygbs.device"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 10211129
        versionName '1.0.21.1129'
        testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
        flavorDimensions "versionCode"

        ndk {
            //设置支持的SO库架构
            abiFilters 'armeabi', 'x86', 'armeabi-v7a', 'x86_64'
        }
    }

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

    dataBinding {
        enabled = true
    }

    android.applicationVariants.all { variant ->
        variant.outputs.all {
            outputFileName = "EasyGBD-Android-" + variant.versionCode + "-" + variant.versionName + ".apk"
        }
    }

    compileOptions {
        sourceCompatibility = '1.8'
        targetCompatibility = '1.8'
    }
}

repositories {
    flatDir {
        dirs 'libs'
    }
    mavenCentral()
    google()
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')

    testImplementation 'junit:junit:4.12'

    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support:support-v4:26.1.0'
    implementation 'com.android.support:preference-v7:26.1.0'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.squareup.okhttp3:okhttp:3.4.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    implementation 'com.github.bumptech.glide:glide:3.7.0'
    implementation 'com.android.support:cardview-v7:26.1.0'
    implementation 'com.github.chrisbanes:PhotoView:1.3.0'
    implementation 'com.squareup:otto:1.3.8'

    androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    }

    implementation project(':library')

    implementation 'android.arch.lifecycle:extensions:1.0.0'
    implementation 'android.arch.lifecycle:reactivestreams:1.0.0'
    implementation 'android.arch.lifecycle:extensions:1.0.0'
    implementation 'android.arch.lifecycle:reactivestreams:1.0.0'
    annotationProcessor "android.arch.lifecycle:compiler:1.0.0"
    annotationProcessor "android.arch.lifecycle:compiler:1.0.0"

    implementation(name: 'libuvccamera-release', ext: 'aar') {
        exclude module: 'support-v4'
        exclude module: 'appcompat-v7'
    }
}
