aboutsummaryrefslogtreecommitdiff
path: root/examples/ex2_espresso/build.gradle
blob: b1d48c29e06f02467f4897816bc7775b5948a2fa (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
apply plugin: 'com.android.application'

android {
    compileSdkVersion 31
    flavorDimensions "examples"

    defaultConfig {
        applicationId "com.google.android.mobly.snippet.example2"
        minSdkVersion 26
        targetSdkVersion 31
        versionCode 1
        versionName "0.0.1"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    productFlavors {
        original {
            dimension "examples"
        }
        snippet {
            testApplicationId "com.google.android.mobly.snippet.example2.snippet"
            dimension "examples"
        }
    }

    lintOptions {
        abortOnError true
        checkAllWarnings true
        warningsAsErrors true
        disable 'HardcodedText', 'UnusedIds','MissingApplicationIcon','GoogleAppIndexingWarning','InvalidPackage','OldTargetApi'
    }
}

dependencies {
    implementation 'androidx.appcompat:appcompat:1.4.0-beta01'
    implementation 'androidx.test:runner:1.4.0'

    // The androidTest package is not for snippet support; it shows an example
    // of an instrumentation test coexisting with a snippet in the same
    // codebase.
    androidTestImplementation 'androidx.annotation:annotation:1.2.0'
    androidTestImplementation 'androidx.test:runner:1.4.0'
    androidTestImplementation('androidx.test.espresso:espresso-core:3.4.0', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    // The 'snippetCompile project' dep is to compile against the snippet lib
    // source in this repo. For your own snippets, you'll want to use the
    // regular 'snippetCompile' dep instead:
    //snippetCompile 'com.google.android.mobly:mobly-snippet-lib:1.4.0'
    snippetImplementation project(':mobly-snippet-lib')

    snippetImplementation 'androidx.annotation:annotation:1.2.0'
    snippetImplementation 'androidx.test:rules:1.4.0'
    snippetImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}