apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.jakewharton.butterknife'

android {
    signingConfigs {
        debug {
            storeFile file('../appkey.jks')
            storePassword 'hongwenjiaoyu'
            keyAlias = 'hongwen'
            keyPassword 'hongwenjiaoyu'
            v1SigningEnabled true
            v2SigningEnabled true
        }
        release {
            storeFile file('../appkey.jks')
            storePassword 'hongwenjiaoyu'
            keyAlias = 'hongwen'
            keyPassword 'hongwenjiaoyu'
            v1SigningEnabled true
            v2SigningEnabled true
        }
    }
    compileSdkVersion 30
    buildToolsVersion '30.0.2'

    defaultConfig {
        applicationId "com.beanpodtech.allinone"
        minSdkVersion 23
        targetSdkVersion 30
        versionCode 40
        versionName "3.1.9"
        javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } }
        ndk {
            //设置支持的SO库架构
            //选择要添加的对应cpu类型的.so库。为了兼容cpu，查看官网SDK的libs多添加几个
            abiFilters 'armeabi-v7a', 'x86', 'x86_64', 'arm64-v8a'
        }
    }

    buildTypes {

        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }
        debug {
            minifyEnabled false
            signingConfig signingConfigs.debug
        }
    }
    packagingOptions {
        exclude 'META-INF/beans.xml'
    }
    externalNativeBuild {
        ndkBuild {
            path 'src/main/cpp/Android.mk'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
    viewBinding {
        enabled = true
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
    ndkVersion '21.2.6472646'

    packagingOptions {//加上这写代码
        pickFirst 'lib/armeabi/libeeoffmpeg.so'
        pickFirst 'lib/armeabi-v7a/libeeoffmpeg.so'
        pickFirst 'lib/arm64-v8a/libeeoffmpeg.so'
        pickFirst 'lib/x86_64/libeeoffmpeg.so'
        pickFirst 'lib/x86/libeeoffmpeg.so'
        pickFirst 'lib/x86_64/libc++_shared.so'
        pickFirst 'lib/armeabi/libc++_shared.so'
        pickFirst 'lib/x86/libc++_shared.so'
        pickFirst 'lib/arm64-v8a/libc++_shared.so'
        pickFirst 'lib/armeabi-v7a/libc++_shared.so'
        pickFirst 'META-INF/core.kotlin_module'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/proguard/androidx-annotations.pro'
        exclude 'META-INF/atomicfu.kotlin_module'
        exclude 'META-INF/MANIFEST.MF'
    }
}

repositories {
    flatDir {
        dirs 'libs', '../libs'
    }
}

kapt {
    arguments {
        arg("AROUTER_MODULE_NAME", project.getName())
    }

    useBuildCache = true
    javacOptions {
        option("-Xmaxerrs", 500)
    }
}
dependencies {
    implementation fileTree(dir: '../libs', include: ['*.jar'])
//    implementation 'com.android.support:support-v4:28.0.3'
    implementation 'androidx.leanback:leanback:1.0.0'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.github.bumptech.glide:glide:4.10.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    //noinspection GradleCompatible
    implementation 'com.android.support:recyclerview-v7:25.3.1'
    implementation 'com.lzy.net:okgo:3.0.4'
    implementation 'com.google.code.gson:gson:2.8.6'
    implementation 'org.fourthline.cling:cling-core:2.1.1'
    implementation 'org.fourthline.cling:cling-support:2.1.1'
    implementation 'com.github.ctiao:DanmakuFlameMaster:0.9.25'


//    implementation 'com.aliyun.sdk.android:AliyunPlayer:5.3.3-full'
    implementation 'com.aliyun.sdk.android:AliyunPlayer:4.7.0-part'


    //阿里云播放器的两个依赖
//    implementation(name: 'AliyunPlayer-4.7.0-part', ext: 'aar')
//    implementation 'com.alivc.conan:AlivcConan:0.9.5'


    implementation project(':AliyunVideoCommon')
    implementation project(':Aliyunplayer:AlivcPlayerTools')
    implementation project(':androidtvwidget')
    implementation externalAndroidAppCompatV7
    implementation externalAndroidSupportV4
    implementation externalAndroidRecyclerView
    implementation externalGSON
    implementation externalOKHTTP
    implementation externalAndroidMultiDex
    implementation 'com.jakewharton:butterknife:10.2.3'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'

    //bugly相关
    implementation 'com.tencent.bugly:crashreport_upgrade:1.5.1'
//其中latest.release指代最新版本号，也可以指定明确的版本号，例如1.2.0
    implementation 'com.tencent.bugly:nativecrashreport:3.9.1'
    //其中latest.release指代最新版本号，也可以指定明确的版本号，例如2.2.0
    implementation 'com.jcodecraeer:xrecyclerview:1.6.0'
    implementation 'org.xwalk:xwalk_core_library:23.53.589.4'

    //依赖的RTC SDK
    implementation 'com.aliyun.rtc:AliRTC-Full:1.17.9.2005112'
//    implementation project(path: ':AliyunVideoCommon')
    implementation 'cn.bingoogolapple:bga-banner:3.0.0'
//    //flowlayout
//    implementation 'com.hyman:flowlayout-lib:1.1.2'

//basepopup
    implementation 'com.github.razerdp:BasePopup:2.2.10'


    // Kotlin
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.7'

    // Android Official
    implementation 'androidx.core:core-ktx:1.3.1'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.activity:activity-ktx:1.1.0'
    implementation 'androidx.fragment:fragment-ktx:1.2.5'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.viewpager:viewpager:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.1.0'
    implementation 'androidx.preference:preference-ktx:1.1.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'

    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.2.0'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'

    implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'

    // Material Dialogs
    implementation 'com.afollestad.material-dialogs:core:3.3.0'
    implementation 'com.afollestad.material-dialogs:input:3.3.0'
    implementation 'com.afollestad.material-dialogs:lifecycle:3.3.0'

    // ARouter
    implementation 'com.alibaba:arouter-api:1.5.0'
//    kapt 'com.alibaba:arouter-compiler:1.2.2'

    // Glide
    //implementation 'com.github.bumptech.glide:glide:4.10.0'
//    kapt 'com.github.bumptech.glide:compiler:4.10.0'

    implementation('com.yalantis:ucrop:2.2.0') {
        //图片剪裁
        exclude group: 'com.android.support'
        exclude group: 'com.squareup.okio'
        exclude group: 'com.squareup.okhttp3'
    }
    implementation "com.google.code.gson:gson:2.8.6"
    implementation('com.github.salomonbrys.kotson:kotson:2.5.0') { // Gson的 kotlin扩展\
        exclude group: 'com.google.code.gson'
    }
    implementation 'com.squareup.okhttp3:okhttp:4.4.0'
    implementation("com.squareup.okhttp3:logging-interceptor:4.4.0") {
        exclude group: 'com.squareup.okhttp3'
    }
    implementation("com.squareup.retrofit2:retrofit:2.7.2") {
        exclude group: 'com.android.support'
        exclude group: 'com.squareup.okio'
        exclude group: 'com.squareup.okhttp3'
        exclude group: 'com.google.code.gson'
    }
    implementation("com.squareup.retrofit2:converter-gson:2.7.2") {
        exclude group: 'com.android.support'
        exclude group: 'com.squareup.okio'
        exclude group: 'com.squareup.okhttp3'
        exclude group: 'com.google.code.gson'
        exclude group: 'com.squareup.retrofit2'
    }
    implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0'

    //AutoDispose解决RxJava内存泄漏
    implementation 'com.uber.autodispose:autodispose:0.7.0'
    implementation 'com.uber.autodispose:autodispose-android:0.7.0'
    implementation 'com.uber.autodispose:autodispose-android-archcomponents:0.7.0'
    // Netty Support
    implementation "io.netty:netty-all:4.1.42.Final"

    // 汉子转拼音 库
    implementation 'com.github.promeg:tinypinyin:2.0.3' // TinyPinyin核心包，约80KB
    implementation 'com.github.promeg:tinypinyin-lexicons-android-cncity:2.0.3'
    // 可选，适用于Android的中国地区词典

    implementation 'io.objectbox:objectbox-android-objectbrowser:2.3.4'
    implementation 'io.objectbox:objectbox-kotlin:2.3.4'

    implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4'
    implementation 'org.greenrobot:eventbus:3.1.1'
    implementation "io.reactivex.rxjava2:rxjava:2.2.8"
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
    implementation 'me.zhanghai.android.materialprogressbar:library:1.6.1'
    implementation 'com.afollestad.assent:core:3.0.0-RC4'
    implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.19'

    implementation 'com.tencent.mars:mars-xlog:1.2.3'
    implementation 'com.tencent:mmkv:1.0.24'
    implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.6.23'

    implementation 'org.koin:koin-androidx-scope:2.0.1'
    implementation 'org.koin:koin-androidx-viewmodel:2.0.1'

    // EEO
    implementation(name: "medusa-1.3.51", ext: "aar")
    implementation(name: "liveroom-1.6.20-sdk", ext: "aar")
    implementation(name: "classinsdk-3.1.7", ext: "aar")
    implementation(name: 'screenrecord-1.0.16', ext: 'aar')
    implementation(name: 'upgrade-1.0.11', ext: 'aar')
    implementation(name: "common-1.9.28", ext: "aar")
    implementation(name: "commonview-1.0.48", ext: "aar")
    implementation(name: "logger-1.1.5", ext: "aar")
    implementation(name: "IjkLib-1.3.11", ext: "aar")
    implementation(name: "pdf-1.2.6", ext: "aar")
    implementation(name: "video-cache-1.0.2", ext: "aar")
    implementation(name: "emoj-1.1.2", ext: "aar")
    implementation(name: "videocodec-1.3.33", ext: "aar")
    implementation(name: "classin-medial-loader-1.0.8", ext: "aar")
    implementation(name: "social-1.0.3.8", ext: "aar")
    implementation(name: "audiotoolkit-1.3.58", ext: "aar")
    implementation(name: "boxing-1.8.9", ext: "aar")
    implementation(name: "viewmove-helper-2.1.4", ext: "aar")
    implementation(name: "basic-2.1.16", ext: "aar")

    implementation(name: "jpegturbo-1.0.1", ext: "aar")

    implementation 'com.github.xiaohaibin:XBanner:androidx_v1.1.2'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.github.chrisbanes:PhotoView:2.1.3'
    implementation 'com.aliyun.dpa:oss-android-sdk:+'

    implementation files('libs\\fastjson-1.2.62.jar')
    implementation(name: 'rpsdk-4.8.3', ext: 'aar')
//    implementation (name:'oss-android-sdk-2.9.2', ext:'aar')
    implementation(name: 'SecurityGuardSDK-external-release-5.5.28-preInstall', ext: 'aar')
    implementation(name: 'SecurityBodySDK-external-release-5.5.28-preInstall', ext: 'aar')
    implementation(name: 'MiddleTierSDK-external-release-5.5.13874142', ext: 'aar')
    implementation(name: 'windvane', ext: 'aar')
    //popupWindow

    implementation 'com.github.zyyoona7:EasyPopup:1.1.2'
    //tabLayout
    implementation 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
    //Adapter helper
    implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.47'
}
