apply plugin: 'com.android.application'

android {
    viewBinding {
        enabled true
    }
    buildFeatures {
        buildConfig true
    }
    namespace "my.project.moviesbox"

    compileSdk 34
    defaultConfig {
        applicationId "my.project.moviesbox"
        minSdkVersion 24
        targetSdkVersion 34
        versionCode 9
        versionName "1.2.2"
//        ndk{abiFilters "armeabi-v7a", "arm64-v8a"}
//        ndk{abiFilters "armeabi-v7a"}
        ndk{abiFilters "arm64-v8a"}
        resConfigs"zh"
        javaCompileOptions {
            annotationProcessorOptions {
                arguments = [
                        "room.schemaLocation": "$projectDir/schemas".toString()
                ]
            }
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }
    buildTypes {
        release {
            minifyEnabled false
            shrinkResources false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/beans.xml'
        exclude 'META-INF/DEPENDENCIES'
    }
}

dependencies {
    // lombok
    compileOnly 'org.projectlombok:lombok:1.18.36'
    annotationProcessor 'org.projectlombok:lombok:1.18.36'
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation files('src/libs/nanohttpd-2.3.1.jar')
    implementation files('src/libs/servlet-api.jar')
    implementation files('src/libs/bcprov-jdk14-138.jar')
    implementation files('src/libs/mobile-ffmpeg-min-4.4.LTS.aar')
    // android
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'androidx.palette:palette:1.0.0'
    implementation 'com.google.android.material:material:1.14.0-alpha01'
    implementation 'androidx.graphics:graphics-shapes:1.1.0-alpha01'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.viewpager2:viewpager2:1.0.0'
    implementation "androidx.core:core-splashscreen:1.1.0-alpha02"
    implementation 'androidx.compose.material3:material3:1.3.0-alpha03'
    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
    implementation 'androidx.navigation:navigation-fragment:2.7.7'
    implementation 'androidx.navigation:navigation-ui:2.7.7'
    implementation 'com.google.firebase:firebase-crashlytics-buildtools:2.9.9'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.3.2'
    implementation "androidx.browser:browser:1.8.0"
    implementation 'com.google.android.flexbox:flexbox:3.0.0'
    // roomDB
    implementation "androidx.room:room-runtime:2.4.0"
    annotationProcessor "androidx.room:room-compiler:2.4.0"
    // https://github.com/CymChad/BaseRecyclerViewAdapterHelper
    implementation "io.github.cymchad:BaseRecyclerViewAdapterHelper:3.0.14"
    // https://github.com/guolindev/PermissionX
    implementation 'com.guolindev.permissionx:permissionx:1.7.1'
    // https://github.com/square/okhttp
    implementation "com.squareup.okhttp3:okhttp:4.12.0"
    // https://github.com/MZCretin/ExpandableTextView
    implementation 'com.github.MZCretin:ExpandableTextView:v1.6.1-x'
    // https://github.com/Jzvd/JZVideo
    implementation 'cn.jzvd:jiaozivideoplayer:7.7.0'
    // player
    implementation 'com.google.android.exoplayer:exoplayer:2.12.1'
    implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
    // 更多ijk的编码支持
    implementation 'io.github.carguo:gsyvideoplayer-ex_so:11.1.0'
    // https://github.com/bumptech/glide
    implementation 'com.github.bumptech.glide:glide:4.16.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0'
    implementation 'com.github.bumptech.glide:okhttp3-integration:4.16.0'
    // https://github.com/wasabeef/glide-transformations
    implementation 'jp.wasabeef:glide-transformations:4.3.0'
    // https://github.com/4thline/cling
    implementation 'org.fourthline.cling:cling-core:2.1.1'
    implementation 'org.fourthline.cling:cling-support:2.1.1'
    // Jetty library
    api 'org.eclipse.jetty:jetty-client:8.1.22.v20160922'
    api 'org.eclipse.jetty:jetty-server:8.1.22.v20160922'
    api 'org.eclipse.jetty:jetty-servlet:8.1.22.v20160922'
    // https://github.com/alibaba/fastjson
    implementation 'com.alibaba:fastjson:1.1.72.android'
    // https://github.com/greenrobot/EventBus
    implementation 'org.greenrobot:eventbus:3.2.0'
    // https://github.com/AriaLyy/Aria
    implementation 'me.laoyuyu.aria:core:3.8.16'
    annotationProcessor 'me.laoyuyu.aria:compiler:3.8.16'
    implementation 'me.laoyuyu.aria:m3u8:3.8.16'
    // https://github.com/bilibili/DanmakuFlameMaster
    implementation 'com.github.ctiao:DanmakuFlameMaster:0.9.25'
    implementation 'com.github.ctiao:ndkbitmap-armv7a:0.9.21'
    // https://github.com/jhy/jsoup
    implementation 'org.jsoup:jsoup:1.14.1'
    // https://github.com/orhanobut/logger
    implementation 'com.orhanobut:logger:2.2.0'
    // https://github.com/google/conscrypt
    implementation 'org.conscrypt:conscrypt-android:2.5.2'
    // https://github.com/kongzue/DialogX/
    def dialogx_version = "0.0.49"
    implementation "com.kongzue.dialogx:DialogX:${dialogx_version}"
    implementation "com.kongzue.dialogx.style:DialogXMaterialYouStyle:${dialogx_version}"
    implementation "com.kongzue.dialogx.style:DialogXIOSStyle:${dialogx_version}"
    implementation 'org.simpleframework:simple-xml:2.7.1'
    implementation 'org.brotli:dec:0.1.2'
    implementation 'com.github.luben:zstd-jni:1.5.5-5@aar'
    testImplementation 'com.github.luben:zstd-jni:1.5.5-5'
    debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.12'

    api files('src/libs/dmc-2.0.0-SNAPSHOT.aar')
    api files('src/libs/dmr-2.0.0-SNAPSHOT.aar')
    api files('src/libs/dms-2.0.0-SNAPSHOT.aar')
    api files('src/libs/core-2.0.0-SNAPSHOT.aar')
}
