/*
 * ********************************************************************************************************************
 *
 *               iFHS7.
 *              ;BBMBMBMc                  rZMBMBR              BMB
 *              MBEr:;PBM,               7MBMMEOBB:             BBB                       RBW
 *     XK:      BO     SB.     :SZ       MBM.       c;;     ir  BBM :FFr       :SSF:    ;xBMB:r   iuGXv.    i:. iF2;
 *     DBBM0r.  :D     S7   ;XMBMB       GMBMu.     MBM:   BMB  MBMBBBMBMS   WMBMBMBBK  MBMBMBM  BMBRBMBW  .MBMBMBMBB
 *      :JMRMMD  ..    ,  1MMRM1;         ;MBMBBR:   MBM  ;MB:  BMB:   MBM. RMBr   sBMH   BM0         UMB,  BMB.  KMBv
 *     ;.   XOW  B1; :uM: 1RE,   i           .2BMBs  rMB. MBO   MBO    JMB; MBB     MBM   BBS    7MBMBOBM:  MBW   :BMc
 *     OBRJ.SEE  MRDOWOR, 3DE:7OBM       .     ;BMB   RMR7BM    BMB    MBB. BMB    ,BMR  .BBZ   MMB   rMB,  BMM   rMB7
 *     :FBRO0D0  RKXSXPR. JOKOOMPi       BMBSSWBMB;    BMBB:    MBMB0ZMBMS  .BMBOXRBMB    MBMDE RBM2;SMBM;  MBB   xBM2
 *         iZGE  O0SHSPO. uGZ7.          sBMBMBDL      :BMO     OZu:BMBK,     rRBMB0;     ,EBMB  xBMBr:ER.  RDU   :OO;
 *     ,BZ, 1D0  RPSFHXR. xWZ .SMr                  . .BBB
 *      :0BMRDG  RESSSKR. 2WOMBW;                   BMBMR
 *         i0BM: SWKHKGO  MBDv
 *           .UB  OOGDM. MK,                                          Copyright (c) 2015-2019.  斯伯坦机器人
 *              ,  XMW  ..
 *                  r                                                                     All rights reserved.
 *
 * ********************************************************************************************************************
 */

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion ANDROID_SDK_VERSION.toInteger()
    buildToolsVersion ANDROID_BUILD_TOOLS_VERSION

    defaultConfig {
        minSdkVersion ANDROID_MIN_SDK_VERSION.toInteger()
        targetSdkVersion ANDROID_SDK_VERSION.toInteger()
        versionCode SAGA_CODE.toInteger()
        versionName SAGA_ANDROID_VERSION

        testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
        vectorDrawables.useSupportLibrary = true
    }

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

    // 解决lint语法检查错误(kotlin语法无法通过lint)
    lintOptions {
        abortOnError false
    }

    kotlinOptions {
        jvmTarget = JVM_TARGET
    }

    compileOptions {
        targetCompatibility JavaVersion.VERSION_1_8
        sourceCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: JUNIT_VERSION
    androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // kotlin 依赖
    implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: KOTLIN_VERSION

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // android支持
    implementation group: 'com.android.support', name: 'appcompat-v7', version: ANDROID_SUPPORT_VERSION
    implementation group: 'com.android.support', name: 'design', version: ANDROID_SUPPORT_VERSION
    implementation group: 'com.android.support', name: 'support-v4', version: ANDROID_SUPPORT_VERSION
    implementation group: 'com.android.support.constraint', name: 'constraint-layout', version: CONSTRAINT_VERSION

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // anko依赖
    // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-commons
    implementation group: 'org.jetbrains.anko', name: 'anko-commons', version: ANKO_VERSION

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 图片加载框架
    // https://mvnrepository.com/artifact/com.squareup.picasso/picasso
    implementation group: 'com.squareup.picasso', name: 'picasso', version: PICASSO_VERSION

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // anko依赖
    // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-common
    implementation group: 'org.jetbrains.anko', name: 'anko-common', version: ANKO_VERSION
    // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-sdk25
    implementation group: 'org.jetbrains.anko', name: 'anko-sdk25', version: ANKO_VERSION
    // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-appcompat-v7
    implementation group: 'org.jetbrains.anko', name: 'anko-appcompat-v7', version: ANKO_VERSION
    // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-design
    implementation group: 'org.jetbrains.anko', name: 'anko-design', version: ANKO_VERSION

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 运行时权限申请
    // https://mvnrepository.com/artifact/pub.devrel/easypermissions
    implementation group: 'pub.devrel', name: 'easypermissions', version: EASYPERMISSIONS_VERSION

//    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//    // 谷歌JSON解析
//    // https://mvnrepository.com/artifact/com.google.code.gson/gson
//    implementation group: 'com.google.code.gson', name: 'gson', version: GSON_VERSION

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // JSON解析
    // https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
    implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: JACKSON_VERSION

    // https://mvnrepository.com/artifact/org.greenrobot/eventbus
    implementation group: 'org.greenrobot', name: 'eventbus', version: EVENTBUS_VERSION

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // https://mvnrepository.com/artifact/javax.persistence/persistence-api
    implementation group: "javax.persistence", name: "persistence-api", version: PERSISTENCE_VERSION

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 二维码与条形码
    // https://mvnrepository.com/artifact/com.google.zxing/core
    implementation group: 'com.google.zxing', name: 'core', version: ZXING_VERSION
    // https://mvnrepository.com/artifact/com.google.zxing/android-core
    implementation group: 'com.google.zxing', name: 'android-core', version: ZXING_VERSION

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Sybotan依赖
    implementation group: 'cn.sagacloud', name: 'saga-kotlin-base', version: SAGA_KOTLIN_VERSION
    implementation 'com.squareup.retrofit2:retrofit:2.3.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
    implementation project(':sybotan-android-base')
    implementation project(':sybotan-android-database')
    implementation project(':sybotan-android-devices')
    implementation project(':sybotan-android-views')
    implementation project(':sybotan-android-graphy')
    implementation project(':sybotan-android-works')
    implementation project(':cadengine')
}