summaryrefslogtreecommitdiffstats
path: root/mobile/android/android-components/components/service/glean/build.gradle
blob: aaed4bac50d3d98cbf9f8ff2e528a81e83cc4727 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* 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 {
    defaultConfig {
        minSdkVersion config.minSdkVersion
        compileSdk config.compileSdkVersion
        targetSdkVersion config.targetSdkVersion
    }

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

    namespace 'mozilla.components.service.glean'
}

// Define library names and version constants.
String GLEAN_LIBRARY = "org.mozilla.telemetry:glean:${Versions.mozilla_glean}"
String GLEAN_LIBRARY_FORUNITTESTS = "org.mozilla.telemetry:glean-native-forUnitTests:${Versions.mozilla_glean}"

dependencies {
    implementation ComponentsDependencies.kotlin_coroutines
    implementation ComponentsDependencies.androidx_work_runtime
    
    api GLEAN_LIBRARY

    // So consumers can set a HTTP client.
    api project(':concept-fetch')

    implementation project(':support-ktx')
    implementation project(':support-base')
    implementation project(':support-utils')

    testImplementation ComponentsDependencies.androidx_test_core

    testImplementation ComponentsDependencies.testing_junit
    testImplementation ComponentsDependencies.testing_robolectric
    testImplementation ComponentsDependencies.testing_mockwebserver
    testImplementation ComponentsDependencies.androidx_work_testing

    testImplementation project(':support-test')
    testImplementation project(':lib-fetch-httpurlconnection')
    testImplementation project(':lib-fetch-okhttp')

    testImplementation GLEAN_LIBRARY_FORUNITTESTS
}

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