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