diff options
Diffstat (limited to 'examples/ex2_espresso/build.gradle')
-rw-r--r-- | examples/ex2_espresso/build.gradle | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/examples/ex2_espresso/build.gradle b/examples/ex2_espresso/build.gradle new file mode 100644 index 0000000..4479e1b --- /dev/null +++ b/examples/ex2_espresso/build.gradle @@ -0,0 +1,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.3.1' + 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' +} |