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

android {
    compileSdkVersion 32
    defaultConfig {
        applicationId "com.google.sample.cast.atvreceiver"
        minSdkVersion 24
        targetSdkVersion 32
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        targetCompatibility JavaVersion.VERSION_1_8
        sourceCompatibility JavaVersion.VERSION_1_8
    }
    sourceSets {
        main {
            res.srcDirs = [projectDir.path+'/../resources']
        }
        androidTest {
            java.srcDirs = ['androidTest']
        }
    }
    namespace 'com.google.sample.cast.atvreceiver'
}

dependencies {
    implementation 'androidx.leanback:leanback:1.0.0'
    implementation 'androidx.appcompat:appcompat:1.5.0'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    implementation 'androidx.lifecycle:lifecycle-common-java8:2.5.1'
    implementation 'com.github.bumptech.glide:glide:4.11.0'

    // Exoplayer
    implementation 'com.google.android.exoplayer:exoplayer:2.18.1'
    implementation 'com.google.android.exoplayer:extension-leanback:2.18.1'
    implementation 'com.google.android.exoplayer:extension-mediasession:2.18.1'

    // Cast Connect libraries
    implementation 'com.google.android.gms:play-services-cast-tv:20.0.0'
    implementation 'com.google.android.gms:play-services-cast:21.2.0'

    implementation "androidx.core:core-ktx:1.8.0"
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
}
