// Copyright 2017-2020 Fitbit, Inc
// SPDX-License-Identifier: Apache-2.0

apply from: project.SDK_VERSIONS_GRADLE

android {
    defaultConfig {
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        debug {
            testCoverageEnabled true
        }
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            consumerProguardFile 'proguard-rules.pro'
        }
        library {
            debuggable true
            minifyEnabled false
            testCoverageEnabled false
        }
    }

    sourceSets {
        main {
            java.srcDirs += 'src/main/kotlin'
            test.java.srcDirs += 'src/test/kotlin'
        }
    }
}

artifactory {
    publish {
        contextUrl = artifactory_url
        repository {
            // The Artifactory repository key to publish to
            repoKey = artifactory_repokey
            username = artifactory_username
            password = artifactory_password
        }
        defaults {
            publications('aar')
            publishArtifacts = true
            publishPom = true
        }
    }
}
