apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
    compileSdkVersion 31
    buildToolsVersion '30.0.3'

    defaultConfig {
        applicationId "com.cappielloantonio.playforsubsonic"
        minSdkVersion 26
        targetSdkVersion 31
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

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

    compileOptions {
        sourceCompatibility 1.8
        targetCompatibility 1.8
    }

    buildFeatures {
        viewBinding true
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])

    // AndroidX
    implementation 'androidx.core:core-ktx:1.6.0'
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
    implementation "androidx.coordinatorlayout:coordinatorlayout:1.1.0"
    implementation 'androidx.preference:preference-ktx:1.1.1'
    implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
    implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
    implementation 'androidx.recyclerview:recyclerview:1.2.1'
    implementation "androidx.room:room-runtime:2.3.0"
    implementation "androidx.cardview:cardview:1.0.0"
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation "androidx.lifecycle:lifecycle-common-java8:2.3.1"

    // Android Material
    implementation 'com.google.android.material:material:1.4.0'

    // Splashscreen
    implementation 'androidx.core:core-splashscreen:1.0.0-alpha01'

    // SearchBar
    implementation "com.paulrybitskyi.persistentsearchview:persistentsearchview:1.1.3"
    implementation "com.arthurivanets.adapster:adapster:1.0.13"

    // Glide
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    implementation 'com.github.bumptech.glide:annotations:4.12.0'
    implementation 'com.github.bumptech.glide:okhttp3-integration:4.12.0'

    // Exoplayer
    implementation 'com.google.android.exoplayer:exoplayer:2.12.2'

    annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
    annotationProcessor "androidx.room:room-compiler:2.3.0"

    // Retrofit
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1'
    implementation 'com.tickaroo.tikxml:retrofit-converter:0.8.15'

    // XMLParser
    implementation 'com.tickaroo.tikxml:annotation:0.9.0_11-SNAPSHOT'
    implementation 'com.tickaroo.tikxml:core:0.9.0_11-SNAPSHOT'
    annotationProcessor 'com.tickaroo.tikxml:processor:0.9.0_11-SNAPSHOT'
    implementation 'com.tickaroo.tikxml:converter-date-rfc3339:0.9.0_11-SNAPSHOT'

    // Database debugger via adb
    // debugImplementation 'com.amitshekhar.android:debug-db:1.0.6'

    // Square - Canary
    // debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7'

    // Red screen of death
    // debugImplementation 'com.melegy.redscreenofdeath:red-screen-of-death:0.1.2'
}