/*
 * 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.TestDeps

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

kotlin {
    jvmToolchain(11)
}

dependencies {
    compileOnly Deps.AndroidX.legacySupportCoreUtils
    compileOnly Deps.AndroidX.androidxAnnotation
    compileOnly Deps.inferAnnotation
    compileOnly Deps.jsr305

    implementation project (':soloader')
    implementation Deps.SoLoader.nativeloader
    implementation project(':ui-common')
    implementation project(':ui-core')
    implementation project(':middleware')

    api project(':fbcore')
    api project(':drawee')
    api project(':imagepipeline')
    api project(':imagepipeline-native')
    api project(':memory-types:ashmem')
    api project(':memory-types:nativememory')
    api project(':memory-types:simple')
    api project(':native-filters')
    api project(':native-imagetranscoder')

    testImplementation TestDeps.junit
    testImplementation TestDeps.mockitoInline
    testImplementation(TestDeps.robolectric) {
        exclude group: 'commons-logging', module: 'commons-logging'
        exclude group: 'org.apache.httpcomponents', module: 'httpclient'
    }
}

android {
    buildToolsVersion FrescoConfig.buildToolsVersion
    compileSdkVersion FrescoConfig.compileSdkVersion

    namespace "com.facebook.drawee.backends.pipeline"

    defaultConfig {
        minSdkVersion FrescoConfig.minSdkVersion
        targetSdkVersion FrescoConfig.targetSdkVersion
    }

    packagingOptions {
        exclude 'LICENSE'
        exclude 'LICENSE.txt'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
    }

    lintOptions {
        abortOnError false
    }
}

apply plugin: "com.vanniktech.maven.publish"
