1apply plugin: 'com.android.application' 2 3android { 4 compileSdkVersion 31 5 flavorDimensions "examples" 6 7 defaultConfig { 8 applicationId "com.google.android.mobly.snippet.example2" 9 minSdkVersion 26 10 targetSdkVersion 31 11 versionCode 1 12 versionName "0.0.1" 13 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 14 } 15 16 productFlavors { 17 original { 18 dimension "examples" 19 } 20 snippet { 21 testApplicationId "com.google.android.mobly.snippet.example2.snippet" 22 dimension "examples" 23 } 24 } 25 26 lintOptions { 27 abortOnError true 28 checkAllWarnings true 29 warningsAsErrors true 30 disable 'HardcodedText', 'UnusedIds','MissingApplicationIcon','GoogleAppIndexingWarning','InvalidPackage','OldTargetApi' 31 } 32} 33 34dependencies { 35 implementation 'androidx.appcompat:appcompat:1.4.0-beta01' 36 implementation 'androidx.test:runner:1.4.0' 37 38 // The androidTest package is not for snippet support; it shows an example 39 // of an instrumentation test coexisting with a snippet in the same 40 // codebase. 41 androidTestImplementation 'androidx.annotation:annotation:1.2.0' 42 androidTestImplementation 'androidx.test:runner:1.4.0' 43 androidTestImplementation('androidx.test.espresso:espresso-core:3.4.0', { 44 exclude group: 'com.android.support', module: 'support-annotations' 45 }) 46 47 // The 'snippetCompile project' dep is to compile against the snippet lib 48 // source in this repo. For your own snippets, you'll want to use the 49 // regular 'snippetCompile' dep instead: 50 //snippetCompile 'com.google.android.mobly:mobly-snippet-lib:1.4.0' 51 snippetImplementation project(':mobly-snippet-lib') 52 53 snippetImplementation 'androidx.annotation:annotation:1.2.0' 54 snippetImplementation 'androidx.test:rules:1.4.0' 55 snippetImplementation 'androidx.test.espresso:espresso-core:3.4.0' 56} 57