plugins {
    id 'com.android.library'
}

android {
    compileSdkVersion rootProject.ext.compileSdkVersion

    resourcePrefix 'lib_player_'

    defaultConfig {
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode rootProject.ext.versionCode
        versionName rootProject.ext.versionName
        consumerProguardFiles 'consumer-proguard-rules.pro'

        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
    }

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

    lintOptions {
        abortOnError false
    }
}

dependencies {
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'

    implementation fileTree(dir: 'libs', include: ['*.jar'])

    compileOnly rootProject.ext.dependencies.androidx_annotation

    // Required, enough for most devices.
    api 'tv.danmaku.ijk.media:ijkplayer-java:0.7.6'
    api 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.7.6'

    // Other ABIs: optional
    api 'tv.danmaku.ijk.media:ijkplayer-armv5:0.7.6'
    api 'tv.danmaku.ijk.media:ijkplayer-x86:0.7.6'

    // ExoPlayer as IMediaPlayer: optional experimental
    api 'tv.danmaku.ijk.media:ijkplayer-exo:0.7.6'
}
