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

import com.facebook.fresco.buildsrc.Deps
import com.facebook.fresco.buildsrc.GradleDeps
import com.facebook.fresco.buildsrc.SampleDeps
import com.facebook.fresco.buildsrc.SampleDeps.Comparison

apply plugin: 'com.android.application'

dependencies {
    compileOnly Deps.jsr305
    implementation Comparison.Glide.glide
    annotationProcessor Comparison.Glide.compiler
    annotationProcessor Deps.AndroidX.androidxAnnotation
    implementation Deps.volley
    implementation Comparison.Uil.uil
    implementation Comparison.Picasso.picasso
    implementation Comparison.Picasso.okhttpDownloader
    implementation SampleDeps.AndroidX.appcompat
    implementation SampleDeps.AndroidX.recyclerview
    implementation Comparison.AndroidQuery.aquery
    implementation Deps.Tools.Stetho.okhttp3

    implementation project(':animated-gif')
    implementation project(':drawee')
    implementation project(':drawee-backends:drawee-pipeline')
    implementation project(':fbcore')
    implementation project(':imagepipeline')
    implementation project(':imagepipeline-backends:imagepipeline-okhttp3')
    implementation project(':imagepipeline-native')
    implementation project(':memory-types:ashmem')
    implementation project(':memory-types:nativememory')
    implementation project(':memory-types:simple')
    implementation project(':native-imagetranscoder')
    implementation project(':tools:stetho')
}

android {
    ndkVersion GradleDeps.Native.version

    buildToolsVersion FrescoConfig.buildToolsVersion
    compileSdkVersion FrescoConfig.compileSdkVersion

    namespace "com.facebook.samples.comparison"
    useLibrary 'org.apache.http.legacy'

    defaultConfig {
        applicationId "com.facebook.samples.comparison"
        minSdkVersion FrescoConfig.samplesMinSdkVersion
        targetSdkVersion FrescoConfig.targetSdkVersion
        versionCode 1
        versionName "${VERSION_NAME}"

        testApplicationId "com.facebook.samples.comparison.test"
        testInstrumentationRunner "android.test.InstrumentationTestRunner"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard.pro'
        }
    }

    lintOptions {
        warning 'InvalidPackage'
        abortOnError false
    }

    splits {
        abi {
            enable true
            reset()
            include 'x86', 'x86_64', 'arm64-v8a', 'armeabi-v7a'
            universalApk false
        }
    }
}
