apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.jakewharton.butterknife'
apply plugin: 'org.greenrobot.greendao'

//apply plugin: 'bugly'
////apply from: 'tinker-support.gradle'A
//// 上传符号表插件
//bugly {
//    debug  = false
//    appId  = 'fd084373ed' // 注册时分配的App ID
//    appKey = 'a4ad086c-1c43-4dcf-92eb-ee0454f4988d' // 注册时分配的App Key
//}

android {
    compileSdkVersion 29

    resourcePrefix 'app'
    defaultConfig {
        applicationId "com.aaron.yespdf"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 32
        versionName "2.2.3"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true

        ndk {
            // 选择要添加的对应cpu类型的.so库。
            // 还可以添加 'x86', 'x86_64', 'mips', 'mips64'
            abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a'//, 'x86', 'x86_64'
        }
    }

    signingConfigs {
        Properties properties = new Properties()
        InputStream inputStream = project.rootProject.file('local.properties').newDataInputStream()
        properties.load(inputStream)
        release {
            storeFile file(properties.getProperty("STORE_FILE_NAME"))
            storePassword properties.getProperty("KEYSTORE_PASSWORD")
            keyAlias properties.getProperty("STORE_ALIAS")
            keyPassword properties.getProperty("KEY_PASSWORD")
        }
    }

    buildTypes {
        release {
            lintOptions {
                checkReleaseBuilds false
                abortOnError false
            }
            manifestPlaceholders = [
                    app_icon : '@drawable/app_ic_yespdf',
                    app_name : '@string/app_name_en'
            ]
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }

        debug {
            applicationIdSuffix '.dev'
            manifestPlaceholders = [
                    app_icon : '@drawable/app_ic_yespdf_dev',
                    app_name : '@string/app_name_dev'
            ]
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }
    }

    compileOptions {
        sourceCompatibility = 1.8
        targetCompatibility = 1.8
    }
}

greendao {
    schemaVersion 3 // 数据库版本号
    daoPackage 'com.aaron.yespdf.common.greendao' // 设置 DaoMaster、DaoSession、Dao包名
    targetGenDir 'src/main/java' // 设置DaoMaster、DaoSession、Dao目录
    // targetGenDirTest：设置生成单元测试目录
    // generateTests：设置自动生成单元测试用例
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.google.android.material:material:1.3.0-alpha01'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

    implementation project(':android-pdf-viewer')
    implementation 'com.aaron:base:1.1.5-beta9'
    implementation 'com.jakewharton:butterknife:10.1.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
    implementation 'org.greenrobot:greendao:3.2.2'
    implementation 'com.github.anzewei:parallaxbacklayout:1.1.9'
    implementation 'com.github.mmin18:realtimeblurview:1.2.1'
    implementation 'org.greenrobot:eventbus:3.1.1'
    implementation 'com.github.bmelnychuk:atv:1.2.9'
//    implementation 'com.tencent.bugly:crashreport_upgrade:1.4.0'
//    implementation 'com.tencent.bugly:nativecrashreport:3.7.1'
//    implementation 'com.tencent.tinker:tinker-android-lib:1.9.9'
    debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.3'
    releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.3'
    implementation "androidx.core:core-ktx:1.3.0"
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.2'

    implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.46'
//    implementation 'io.github.yuweiguocn:GreenDaoUpgradeHelper:v2.2.1'

    implementation  'com.umeng.umsdk:common:9.1.0' // (必选)
    implementation  'com.umeng.umsdk:asms:1.1.3' // asms包依赖(必选)
    implementation 'com.umeng.umsdk:crash:0.0.4' // native crash包依赖(必选)
    implementation  'com.umeng.umsdk:oaid_lenovo:1.0.0' // (可选)
    implementation  'com.umeng.umsdk:oaid_mi:1.0.0' // (可选)
    implementation  'com.umeng.umsdk:oaid_oppo:1.0.4' // (可选)
    implementation  'com.umeng.umsdk:oaid_vivo:1.0.0.1' // (可选)
}
repositories {
    mavenCentral()
}
