apply plugin: 'com.android.application'
apply plugin: 'org.greenrobot.greendao'

android {
    compileSdkVersion 33
    ndkVersion "22.1.7171670"
    defaultConfig { 
        applicationId "com.mp.android.apps"
        minSdkVersion 21
        //Android 11 高版本 出现外部存储无法访问的问题
        //https://blog.csdn.net/shellcodelw/article/details/122718045
        targetSdkVersion 28
        versionCode 51
        versionName "3.0.1"
        multiDexEnabled true
        multiDexKeepProguard file("multidexKeep.pro")
    }

    signingConfigs {
        debug {
            v1SigningEnabled true
            v2SigningEnabled true
            storeFile rootProject.file('debug.keystore')
            storePassword 'android'
            keyAlias 'androiddebugkey'
            keyPassword 'android'
        }
        release {
            v1SigningEnabled true
            v2SigningEnabled true
            storeFile rootProject.file('AnyMarvel.jks')
            storePassword SiginPassword
            keyAlias SiginkeyAlias
            keyPassword SiginkeyPassword
        }
    }
    buildTypes {
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.debug
        }
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }
    }
    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }

    }
    compileOptions {
        sourceCompatibility 1.8
        targetCompatibility 1.8
    }
}


dependencies {

    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.google.android.material:material:1.6.0'
    implementation 'androidx.appcompat:appcompat:1.3.0-beta01'

    //下拉刷新库
    implementation 'com.scwang.smart:refresh-layout-kernel:2.0.0-alpha-1'
    implementation 'com.scwang.smart:refresh-header-classics:2.0.0-alpha-1'    //经典刷新头
    implementation 'com.scwang.smart:refresh-footer-classics:2.0.0-alpha-1'    //经典加载

    implementation 'androidx.multidex:multidex:2.0.0'
    //glide图片库依赖
    implementation 'com.github.bumptech.glide:glide:4.9.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'

    //其中latest.release指代最新版本号，也可以指定明确的版本号，例如1.2.0
    implementation 'com.alibaba:fastjson:1.1.70.android'

    implementation files('libs/jcc-bate-0.7.3.jar')

    //https://github.com/xdrop/fuzzywuzzy
    //https://samperson1997.github.io/2018/05/09/fuzzywuzzy/ 字符串相似度排序
    implementation 'me.xdrop:fuzzywuzzy:1.4.0'


//    https://github.com/azhon/AppUpdate
    implementation 'io.github.azhon:appupdate:4.2.9'//update

    //loading 圈
    implementation 'com.victor:lib:1.0.4'
    //动态权限适配
    implementation 'com.mylhyl:acp:1.2.0'
    //butterknife
    implementation 'com.jakewharton:butterknife:10.2.3'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'

    //opencc lib
    implementation "com.zqc.opencc.android.lib:lib-opencc-android:0.8.0@aar"

    //GreenDao
    api 'org.greenrobot:greendao:3.3.0'
    api 'org.greenrobot:greendao-generator:3.3.0'
    //JSOUP
    api 'org.jsoup:jsoup:1.10.2'
    //沉浸式状态栏
    api 'com.zhangmonke:ImmerseLayout:1.1.1'
    //ProgressBar
    api 'com.zhangmonke:MProgressBar:1.0.1'
    //greenDao的数据库升级
    api 'io.github.yuweiguocn:GreenDaoUpgradeHelper:v2.2.1'
    //AutofitTextView
    api 'me.grantland:autofittextview:0.2.1'
    //删除粒子效果
    api 'tyrantgit:explosionfield:1.0.1'
    //View简易动画
    api 'com.daimajia.easing:library:2.0@aar'
    api 'com.daimajia.androidanimations:library:2.2@aar'
    //CircleImageView
    api 'de.hdodenhof:circleimageview:2.1.0'
    //SwitchButton
    api 'com.kyleduo.switchbutton:library:1.4.4'
    api 'com.victor:lib:1.0.4'
    api files('libs/commons-codec-1.10-sources.jar')
    api files('libs/juniversalchardet-1.0.3.jar')

    //RxAndroid
    api 'io.reactivex.rxjava2:rxandroid:2.1.0'
    api 'io.reactivex.rxjava2:rxjava:2.2.5'

    //Rxlifecycle
    api 'com.trello.rxlifecycle2:rxlifecycle:2.0.1'
    api 'com.trello.rxlifecycle2:rxlifecycle-android:2.0.1'
    // If you want to bind to Android-specific lifecycles
    api 'com.trello.rxlifecycle2:rxlifecycle-components:2.0.1'
    // If you want pre-written Activities and Fragments you can subclass as providers
    api 'com.trello.rxlifecycle2:rxlifecycle-navi:2.0.1'  // If you want to use Navi for providers
    api 'com.trello.rxlifecycle2:rxlifecycle-kotlin:2.0.1' // If you want to use Kotlin syntax

    //Retrofit
    api 'com.squareup.retrofit2:retrofit:2.2.0'
    api 'com.squareup.retrofit2:adapter-rxjava2:2.2.0'
    api 'com.squareup.retrofit2:converter-gson:2.2.0'
    api 'com.squareup.retrofit2:converter-scalars:2.2.0'
    api ('com.github.ihsanbal:LoggingInterceptor:3.1.0') {
        exclude group: 'org.json', module: 'json'
    }

    //RxBus
    api('com.hwangjr.rxbus:rxbus:2.0.0-beta') {
        exclude group: 'com.jakewharton.timber', module: 'timber'
    }

    // 友盟基础组件库（所有友盟业务SDK都依赖基础组件库）
    api  'com.umeng.umsdk:common:9.5.4'// (必选)
    api  'com.umeng.umsdk:asms:1.6.3'// 必选
    api  'com.umeng.umsdk:abtest:1.0.1'//使用U-App中ABTest能力，可选
    api 'com.umeng.umsdk:apm:1.9.2'// U-APM产品包依赖(必选)

}


greendao {
    schemaVersion 2
    daoPackage 'com.mp.android.apps.book.dao'
    targetGenDir 'src/main/java'
}