/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

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

android {
    compileSdkVersion config.compileSdkVersion

    defaultConfig {
        minSdkVersion config.minSdkVersion
        targetSdkVersion config.targetSdkVersion

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

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

dependencies {
    // These dependencies are part of this module's public API.
    api(Dependencies.mozilla_places) {
        // Use our own version of the Glean dependency,
        // which might be different from the version declared by A-S.
        exclude group: 'org.mozilla.components', module: 'service-glean'
    }

    api Dependencies.mozilla_remote_tabs
    api project(':concept-storage')
    api project(':concept-sync')

    implementation project(':support-utils')
    implementation project(':support-sync-telemetry')

    implementation Dependencies.kotlin_stdlib

    testImplementation project(':support-test')

    testImplementation Dependencies.androidx_test_core
    testImplementation Dependencies.androidx_test_junit
    testImplementation Dependencies.testing_robolectric
    testImplementation Dependencies.testing_mockito

    testImplementation Dependencies.mozilla_places
    testImplementation Dependencies.mozilla_remote_tabs
    testImplementation Dependencies.testing_mockwebserver

    testImplementation Dependencies.mozilla_full_megazord_forUnitTests
    testImplementation Dependencies.mozilla_glean_forUnitTests
}

apply from: '../../../publish.gradle'
ext.configurePublish(config.componentsGroupId, archivesBaseName, project.ext.description)
