apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion '27.0.3'
    defaultConfig {
        applicationId "com.wuzhanglao.niubi"
        minSdkVersion 16
        targetSdkVersion 27
        versionCode 1
        versionName "1.0.0"

        manifestPlaceholders = [KEY_UMENG: '5810166a7666132fe5002154']
    }

    signingConfigs {
        release {
            Properties properties = new Properties()
            properties.load(project.rootProject.file("local.properties").newDataInputStream())
            if (properties.getProperty("FLAG") != null) {
                storeFile file(KEYSTORE_FILE)
                storePassword KEYSTORE_PASSWORD
                keyAlias KEYSTORE_ALIAS
                keyPassword KEYSTORE_ALIAS_PASSWORD
            }
        }
    }

    buildTypes {
        debug {
            debuggable true
            versionNameSuffix "-debug"
            applicationIdSuffix ".debug"
            resValue "string", "app_name", "Notes测试版"
        }

        release {
            debuggable false
            //混淆
            minifyEnabled true
            //Zipalign优化
            zipAlignEnabled true
            //移除无用的resource文件
            shrinkResources true
            //加载默认混淆配置文件
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            //apk打包的时候需要签名
            signingConfig signingConfigs.release

            resValue "string", "app_name", "Notes正式版本"
        }
    }

    dexOptions {
        preDexLibraries true
        dexInProcess = true
        javaMaxHeapSize "4g"
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    //    compile 'com.android.support:multidex:1.0.1'
    implementation 'com.android.support:cardview-v7:27.1.1'
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:recyclerview-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    //glide
    implementation 'com.github.bumptech.glide:glide:4.7.1'
    //rxjava
    implementation 'io.reactivex:rxjava:1.3.0'
    implementation 'io.reactivex:rxandroid:1.2.1'
    //rx-lifecycle
    implementation 'com.trello:rxlifecycle:0.5.0'
    implementation 'com.trello:rxlifecycle-components:0.5.0'
    //retrofit
    implementation 'com.squareup.retrofit2:retrofit:2.3.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
    implementation 'com.squareup.retrofit2:adapter-rxjava:2.3.0'
    //okhttp
    implementation 'com.squareup.okhttp3:okhttp:3.9.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
    //友盟统计
    //compile 'com.umeng.analytics:analytics:latest.integration'
    //监听网络状态
    implementation 'com.github.pwittchen:reactivenetwork:0.8.0'
    //event bus
    implementation 'org.greenrobot:eventbus:3.0.0'
    //logger
    implementation 'com.orhanobut:logger:1.15'
    //blur
    implementation 'jp.wasabeef:blurry:2.1.1'
}
