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

buildscript {
    repositories {
        maven {
            url "https://maven.mozilla.org/maven2"
        }
    }
}

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

android {
    compileSdkVersion config.compileSdkVersion

    defaultConfig {
        minSdkVersion config.minSdkVersion
        targetSdkVersion config.targetSdkVersion
    }

    buildTypes {
        debug {
            // Export experiments proguard rules even in debug since consuming apps may still
            // enable proguard/R8
            consumerProguardFiles 'proguard-rules-consumer.pro'
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            consumerProguardFiles 'proguard-rules-consumer.pro'
        }
    }
}

dependencies {
    // These dependencies are part of this module's public API.
    api(Dependencies.mozilla_nimbus) {
        // 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'
    }

    implementation Dependencies.androidx_core_ktx
    implementation Dependencies.androidx_constraintlayout
    implementation Dependencies.androidx_coordinatorlayout
    implementation Dependencies.androidx_recyclerview
    implementation Dependencies.kotlin_stdlib
    implementation Dependencies.kotlin_coroutines
    implementation project(':support-base')
    implementation project(':support-locale')

    testImplementation Dependencies.androidx_work_testing

    testImplementation Dependencies.mozilla_full_megazord_forUnitTests
    testImplementation Dependencies.androidx_test_core
    testImplementation Dependencies.androidx_test_junit
    testImplementation Dependencies.testing_mockito
    testImplementation Dependencies.testing_mockwebserver
    testImplementation Dependencies.testing_robolectric
    testImplementation project(':support-test')
}

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