// Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.

apply plugin: 'com.android.library'

android {
    compileSdkVersion rootProject.compileSdkVersion
    buildToolsVersion rootProject.buildToolsVersion

    testOptions.unitTests.includeAndroidResources = true

    defaultConfig {
        minSdkVersion rootProject.minSdkVersion
        targetSdkVersion rootProject.targetSdkVersion
        buildConfigField "boolean", "IS_INTERNAL_BUILD", 'true'
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }

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

    sourceSets {
        androidTest {
            java {
                // disable in OSS build until dav1d is integrated
                exclude '**/ivfav1/**/*.java'
            }
        }
    }
}

dependencies {
    compileOnly deps.jsr305
    implementation deps.soloader
    implementation deps.supportMultidex
    androidTestImplementation project(':android:spectrumdefault')
    androidTestImplementation project(':android:spectrumpluginplatform')
    androidTestImplementation project(':android:spectrumtestutils')
    androidTestImplementation project(':fbjni')

    androidTestImplementation deps.festAssert
    androidTestImplementation deps.junit
    androidTestImplementation deps.robolectric
    androidTestImplementation deps.mockitoCore
    androidTestImplementation deps.dexmaker
    androidTestImplementation deps.dexmakerMockito
    androidTestImplementation deps.supportTestRunner
    androidTestImplementation deps.supportTestRules
}
