diff options
author | Keith Dart <keith.dart@gmail.com> | 2017-12-15 19:40:09 -0800 |
---|---|---|
committer | Ang Li <angli@google.com> | 2017-12-15 19:40:09 -0800 |
commit | aeddc8bcd123ddf6c865622464001fe0f3835b87 (patch) | |
tree | 2497bdc66fbe0df6b5990d0b71479b520eed6620 /examples/ex2_espresso/build.gradle | |
parent | f48f37f7a4de86306cc7193d92b464fab491b67b (diff) | |
download | mobly-snippet-lib-aeddc8bcd123ddf6c865622464001fe0f3835b87.tar.gz |
Update gradle, dependency versions and fix lint reported issues (#80)
* Update to latest build tools.
* Fix lint issues and reformat.
* Add presubmit target.
* Fix IDE reported issues.
* Fix test runner versions in example.
* Review feedback changes.
* Make getPrivateInetAddress a private method.
Diffstat (limited to 'examples/ex2_espresso/build.gradle')
-rw-r--r-- | examples/ex2_espresso/build.gradle | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/examples/ex2_espresso/build.gradle b/examples/ex2_espresso/build.gradle index a8c0c31..2757808 100644 --- a/examples/ex2_espresso/build.gradle +++ b/examples/ex2_espresso/build.gradle @@ -1,39 +1,46 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 24 - buildToolsVersion '25.0.0' + compileSdkVersion 26 + flavorDimensions "examples" defaultConfig { applicationId "com.google.android.mobly.snippet.example2" - minSdkVersion 11 - targetSdkVersion 24 + minSdkVersion 15 + targetSdkVersion 22 versionCode 1 versionName "0.0.1" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } productFlavors { - main {} - snippet {} + main { + dimension "examples" + } + snippet { + dimension "examples" + } } + lintOptions { abortOnError true checkAllWarnings true warningsAsErrors true + disable 'HardcodedText', 'UnusedIds','MissingApplicationIcon','GoogleAppIndexingWarning','InvalidPackage','OldTargetApi' } } dependencies { - compile 'com.android.support:appcompat-v7:24.2.1' + implementation 'com.android.support:appcompat-v7:26.1.0' + implementation 'com.android.support.test:runner:1.0.1' // The androidTest package is not for snippet support; it shows an example // of an instrumentation test coexisting with a snippet in the same // codebase. - androidTestCompile 'com.android.support:support-annotations:24.2.1' - androidTestCompile 'com.android.support.test:runner:0.5' - androidTestCompile 'com.android.support.test:rules:0.5' - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + androidTestImplementation 'com.android.support:support-annotations:26.1.0' + androidTestImplementation 'com.android.support.test:runner:1.0.1' + androidTestImplementation 'com.android.support.test:rules:1.0.1' + androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', { exclude group: 'com.android.support', module: 'support-annotations' }) @@ -41,8 +48,8 @@ dependencies { // 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.2.0' - snippetCompile project(':mobly-snippet-lib') + snippetImplementation project(':mobly-snippet-lib') - snippetCompile 'com.android.support.test.espresso:espresso-core:2.2.2' - snippetCompile 'com.android.support:support-annotations:24.2.1' + snippetImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' + snippetImplementation 'com.android.support:support-annotations:26.1.0' } |