group 'com.github.florent37.assets_audio_player'
version '1.0-SNAPSHOT'

buildscript {
    ext.kotlin_version = '1.7.21'
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:8.2.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

rootProject.allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

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

android {
    compileSdk 34

    if (project.android.hasProperty("namespace")) {
        namespace 'com.github.florent37.assets_audio_player'
    }

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }
    defaultConfig {
        multiDexEnabled true
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    lintOptions {
        disable 'InvalidPackage'
    }
    packagingOptions {
        exclude "DebugProbesKt.bin"
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

dependencies {

    def coroutinesVersion = '1.6.4'

    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation "androidx.multidex:multidex:2.0.1"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
    implementation 'androidx.annotation:annotation:1.5.0'

    def exoPlayerVersion = '2.18.1'

    implementation "com.google.android.exoplayer:exoplayer:$exoPlayerVersion"
    implementation "com.google.android.exoplayer:exoplayer-hls:$exoPlayerVersion"
    implementation "com.google.android.exoplayer:exoplayer-dash:$exoPlayerVersion"
    implementation "com.google.android.exoplayer:exoplayer-smoothstreaming:$exoPlayerVersion"
    implementation 'com.github.bumptech.glide:glide:4.14.2'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.14.2'
    implementation 'androidx.media:media:1.6.0'
}
