plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-kapt'
    id 'androidx.navigation.safeargs'
}

android {
    compileSdkVersion 30
    ndkVersion '21.4.7075529'

    defaultConfig {
        applicationId "com.mee.player"
        minSdkVersion 23
        targetSdkVersion 30
        versionCode 2
        versionName "0.2"
        archivesBaseName = "Mee.Player.v${versionName}"
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            shrinkResources true
        }
    }

    buildFeatures {
        dataBinding true
    }

    // For Kotlin projects
    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_1_8.toString()
    }

    flavorDimensions "connectivity"
    productFlavors {
        offline {
            dimension "connectivity"
            //versionNameSuffix "-offline"
        }
        online {
            dimension "connectivity"
//            applicationIdSuffix ".online"
//            versionNameSuffix "-online"
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    lintOptions {
        disable 'MissingTranslation'
    }
}

dependencies {
    implementation 'androidx.appcompat:appcompat:1.3.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    implementation 'androidx.recyclerview:recyclerview:1.2.1'
    implementation 'androidx.recyclerview:recyclerview-selection:1.1.0'

    // Kotlin Libraries
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation("androidx.core:core-ktx:1.5.0")
    implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version")

    
    // Do not touch it unless required
    def exoplayerVersion = '2.14.1'
    implementation "com.google.android.exoplayer:exoplayer-core:$exoplayerVersion"
    implementation "com.google.android.exoplayer:exoplayer-ui:$exoplayerVersion"
    implementation "com.google.android.exoplayer:extension-mediasession:$exoplayerVersion"
    onlineImplementation "com.google.android.exoplayer:exoplayer-dash:$exoplayerVersion"
    onlineImplementation "com.google.android.exoplayer:exoplayer-hls:$exoplayerVersion"
    onlineImplementation "com.google.android.exoplayer:exoplayer-smoothstreaming:$exoplayerVersion"
    onlineImplementation "com.google.android.exoplayer:exoplayer-rtsp:$exoplayerVersion"
    implementation 'com.getkeepsafe.taptargetview:taptargetview:1.13.2'
    implementation 'com.google.android.material:material:1.3.0'
    implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
    implementation 'com.ibm.icu:icu4j:69.1'
    onlineImplementation 'com.github.javiersantos:AppUpdater:2.7'
    onlineImplementation 'io.github.g00fy2:versioncompare:1.4.1'
    onlineImplementation 'com.arthenica:ffmpeg-kit-min:4.4.LTS'
    onlineImplementation 'com.github.hedzr:android-file-chooser:v1.2.0-final'
    implementation project(path: ':doubletapplayerview')
    implementation fileTree(dir: "libs", include: ["*.aar"])


    // Chip Navigation Bar
    implementation 'com.ismaeldivita.chipnavigation:chip-navigation-bar:1.3.4'

    // For loading media files
   // implementation 'com.jiajunhui.xapp.medialoader:medialoader:1.2.1'


    // Navigation Componets
    implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
    implementation "androidx.navigation:navigation-ui-ktx:$nav_version"

    implementation "com.github.bumptech.glide:glide:$glide_version"
    annotationProcessor "com.github.bumptech.glide:compiler:$glide_version"

    // Manages Permissions
    implementation 'com.karumi:dexter:6.2.2'

    implementation 'com.simplecityapps:recyclerview-fastscroll:2.0.1'

    implementation 'com.github.CodeBoy722:MediaFacer:1.0.3'

//    For managing file operations
    //implementation "com.anggrayudi:storage:0.6.0"

//    implementation 'com.quiph.ui:recyclerviewfastscroller:1.0.0'

//    //Flexible Adapter
//    implementation 'eu.davidea:flexible-adapter:5.1.0'
//    implementation 'eu.davidea:flexible-adapter-ui:1.0.0'
//    implementation 'eu.davidea:flexible-adapter-livedata:1.0.0-b3'
//    // From 1.0.0-b3, library is compiled with data binding v2
//    implementation 'eu.davidea:flexible-adapter-databinding:1.0.0'

    //Fast Adapter
    implementation "com.mikepenz:fastadapter:${latestFastAdapterRelease}"
//    implementation "com.mikepenz:fastadapter-extensions-expandable:${latestFastAdapterRelease}"

    implementation "com.mikepenz:fastadapter-extensions-binding:${latestFastAdapterRelease}" // view binding helpers
    implementation "com.mikepenz:fastadapter-extensions-diff:${latestFastAdapterRelease}" // diff util helpers
//    implementation "com.mikepenz:fastadapter-extensions-drag:${latestFastAdapterRelease}" // drag support
//    implementation "com.mikepenz:fastadapter-extensions-paged:${latestFastAdapterRelease}" // paging support
//    implementation "com.mikepenz:fastadapter-extensions-scroll:${latestFastAdapterRelease}" // scroll helpers
//    implementation "com.mikepenz:fastadapter-extensions-swipe:${latestFastAdapterRelease}" // swipe support
//    implementation "com.mikepenz:fastadapter-extensions-ui:${latestFastAdapterRelease}" // pre-defined ui components
//    implementation "com.mikepenz:fastadapter-extensions-utils:${latestFastAdapterRelease}" // needs the `expandable`, `drag` and `scroll` extension.
}