apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'org.greenrobot.greendao'

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"

    defaultConfig {
        applicationId "com.github.airsaid.accountbook"
        minSdkVersion 17
        targetSdkVersion 25
        versionCode 9
        versionName "1.0.8"
        ndk {
            // 设置支持的SO库架构
            abiFilters 'armeabi', 'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
        }
    }

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

            manifestPlaceholders = [
                    "leancloud_appid" : properties.getProperty("leancloud.appid"),
                    "leancloud_appkey": properties.getProperty("leancloud.appkey"),
                    "bugly_appid"     : properties.getProperty("bugly.appid")
            ]
        }
        debug {
            minifyEnabled false
            manifestPlaceholders = [
                    "leancloud_appid" : properties.getProperty("leancloud.appid"),
                    "leancloud_appkey": properties.getProperty("leancloud.appkey"),
                    "bugly_appid"     : properties.getProperty("bugly.appid")
            ]
        }
    }

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

    // 为了解决部分第三方库重复打包了META-INF的问题
    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }

    lintOptions {
        abortOnError false
    }

}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:25.3.1'
    // Material design 兼容库
    compile 'com.android.support:design:25.3.1'
    // CardView 支持库
    compile 'com.android.support:cardview-v7:25.3.1'
    // 取色库
    compile 'com.android.support:palette-v7:25.3.1'
    // LeanCloud 基础包
    compile 'cn.leancloud.android:avoscloud-sdk:v3.+'
    // retrofit2 网络请求库
    compile 'com.squareup.retrofit2:retrofit:2.1.0'
    // Gson 解析库
    compile 'com.squareup.retrofit2:converter-gson:2.1.0'
    // Glide 图片加载库
    compile 'com.github.bumptech.glide:glide:3.7.0'
    // 控件注解库
    compile 'com.jakewharton:butterknife:8.0.1'
    apt 'com.jakewharton:butterknife-compiler:8.0.1'
    // 消息传递库
    compile 'org.greenrobot:eventbus:3.0.0'
    // 转场动画库
    compile 'me.immortalz:transitionhelper:1.0.6'
    // RecyclerView Adapter 库
    compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.17'
    // MD 风格输入 Dialog
    compile 'com.github.StephaneBg:SimpleNumberPicker:1.3'
    // 图片选择库
    compile 'com.github.LuckSiege.PictureSelector:picture_library:v1.4.6'
    // 腾讯 Bugly
    compile 'com.tencent.bugly:crashreport_upgrade:1.2.5'
    compile 'com.tencent.bugly:nativecrashreport:3.1.2'
    // greenDAO 数据库框架
    compile 'org.greenrobot:greendao:3.2.2'
    // 图表库
    compile 'com.github.PhilJay:MPAndroidChart:v3.0.2'
}
