Update to new test runner and espresso.

test runner 0.6-alpha and espresso 2.6-alpha have fixed the issue
with broken @UIThreadTest annotation. This change moves support
library to use these versions.

Bug: 29547049
Change-Id: I3d53e2594871461d4f293713a3637395afc43d3e
diff --git a/build.gradle b/build.gradle
index 291dac2..38a308e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -36,6 +36,9 @@
 ext.buildToolsVersion = '23.0.2'
 ext.buildNumber = Integer.toString(ext.extraVersion)
 
+ext.testRunnerVersion = '0.6-alpha'
+ext.espressoVersion = '2.3-alpha'
+
 // Enforce the use of prebuilt dependencies in all sub-projects. This is
 // required for the doclava dependency.
 ext.usePrebuilts = "true"
diff --git a/compat/build.gradle b/compat/build.gradle
index ba84b8e..cd9e693 100644
--- a/compat/build.gradle
+++ b/compat/build.gradle
@@ -4,10 +4,10 @@
 
 createApiSourceSets(project, gradle.ext.studioCompat.modules.compat.apiTargets)
 dependencies {
-    androidTestCompile ('com.android.support.test:runner:0.4.1') {
+    androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
         exclude module: 'support-annotations'
     }
-    androidTestCompile ('com.android.support.test.espresso:espresso-core:2.2.1') {
+    androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
         exclude module: 'support-annotations'
     }
     androidTestCompile 'org.mockito:mockito-core:1.9.5'
diff --git a/core-ui/build.gradle b/core-ui/build.gradle
index 27f98a2..5ae0655 100644
--- a/core-ui/build.gradle
+++ b/core-ui/build.gradle
@@ -5,10 +5,10 @@
 createApiSourceSets(project, gradle.ext.studioCompat.modules.coreui.apiTargets)
 dependencies {
     compile project(':support-compat')
-    androidTestCompile ('com.android.support.test:runner:0.4.1') {
+    androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
         exclude module: 'support-annotations'
     }
-    androidTestCompile ('com.android.support.test.espresso:espresso-core:2.2.1') {
+    androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
         exclude module: 'support-annotations'
     }
     androidTestCompile 'org.mockito:mockito-core:1.9.5'
diff --git a/core-utils/build.gradle b/core-utils/build.gradle
index a9ef42e..f6ceb14 100644
--- a/core-utils/build.gradle
+++ b/core-utils/build.gradle
@@ -5,10 +5,10 @@
 createApiSourceSets(project, gradle.ext.studioCompat.modules.coreutils.apiTargets)
 dependencies {
     compile project(':support-compat')
-    androidTestCompile ('com.android.support.test:runner:0.4.1') {
+    androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
         exclude module: 'support-annotations'
     }
-    androidTestCompile ('com.android.support.test.espresso:espresso-core:2.2.1') {
+    androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
         exclude module: 'support-annotations'
     }
     androidTestCompile 'org.mockito:mockito-core:1.9.5'
diff --git a/customtabs/build.gradle b/customtabs/build.gradle
index fd850bd..98f3076 100644
--- a/customtabs/build.gradle
+++ b/customtabs/build.gradle
@@ -6,10 +6,10 @@
     compile project(':support-compat')
     compile project(':support-annotations')
 
-    androidTestCompile ('com.android.support.test:runner:0.4.1') {
+    androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
         exclude module: 'support-annotations'
     }
-    androidTestCompile ('com.android.support.test.espresso:espresso-core:2.2.1') {
+    androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
         exclude module: 'support-annotations'
     }
     testCompile 'junit:junit:4.12'
diff --git a/design/build.gradle b/design/build.gradle
index ccbffb2..4407ba9 100644
--- a/design/build.gradle
+++ b/design/build.gradle
@@ -7,10 +7,10 @@
     compile project(':support-appcompat-v7')
     compile project(':support-recyclerview-v7')
 
-    androidTestCompile ('com.android.support.test:runner:0.4.1') {
+    androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
         exclude module: 'support-annotations'
     }
-    androidTestCompile ('com.android.support.test.espresso:espresso-core:2.2.1') {
+    androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
         exclude module: 'support-annotations'
     }
     androidTestCompile 'org.mockito:mockito-core:1.9.5'
diff --git a/fragment/build.gradle b/fragment/build.gradle
index aea1800..592c856 100644
--- a/fragment/build.gradle
+++ b/fragment/build.gradle
@@ -8,10 +8,10 @@
     compile project(':support-media-compat')
     compile project(':support-core-ui')
     compile project(':support-core-utils')
-    androidTestCompile ('com.android.support.test:runner:0.4.1') {
+    androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
         exclude module: 'support-annotations'
     }
-    androidTestCompile ('com.android.support.test.espresso:espresso-core:2.2.1') {
+    androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
         exclude module: 'support-annotations'
     }
     androidTestCompile 'org.mockito:mockito-core:1.9.5'
diff --git a/graphics/drawable/animated/build.gradle b/graphics/drawable/animated/build.gradle
index d8b6962..df11178 100644
--- a/graphics/drawable/animated/build.gradle
+++ b/graphics/drawable/animated/build.gradle
@@ -4,10 +4,10 @@
 
 dependencies {
     compile project(':support-vector-drawable')
-    androidTestCompile ('com.android.support.test:runner:0.4.1') {
+    androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
         exclude module: 'support-annotations'
     }
-    androidTestCompile ('com.android.support.test.espresso:espresso-core:2.2.1') {
+    androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
         exclude module: 'support-annotations'
     }
     testCompile 'junit:junit:4.12'
diff --git a/graphics/drawable/static/build.gradle b/graphics/drawable/static/build.gradle
index 5e21b12..2564a27 100644
--- a/graphics/drawable/static/build.gradle
+++ b/graphics/drawable/static/build.gradle
@@ -4,10 +4,10 @@
 
 dependencies {
     compile project(':support-compat')
-    androidTestCompile ('com.android.support.test:runner:0.4.1') {
+    androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
         exclude module: 'support-annotations'
     }
-    androidTestCompile ('com.android.support.test.espresso:espresso-core:2.2.1') {
+    androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
         exclude module: 'support-annotations'
     }
     testCompile 'junit:junit:4.12'
diff --git a/media-compat/build.gradle b/media-compat/build.gradle
index 660937d..3e547b3 100644
--- a/media-compat/build.gradle
+++ b/media-compat/build.gradle
@@ -5,10 +5,10 @@
 createApiSourceSets(project, gradle.ext.studioCompat.modules.mediacompat.apiTargets)
 dependencies {
     compile project(':support-compat')
-    androidTestCompile ('com.android.support.test:runner:0.4.1') {
+    androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
         exclude module: 'support-annotations'
     }
-    androidTestCompile ('com.android.support.test.espresso:espresso-core:2.2.1') {
+    androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
         exclude module: 'support-annotations'
     }
     androidTestCompile 'org.mockito:mockito-core:1.9.5'
diff --git a/percent/build.gradle b/percent/build.gradle
index 59817f4..4fe4630 100644
--- a/percent/build.gradle
+++ b/percent/build.gradle
@@ -5,10 +5,10 @@
 dependencies {
     compile project(':support-compat')
 
-    androidTestCompile ('com.android.support.test:runner:0.4.1') {
+    androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
         exclude module: 'support-annotations'
     }
-    androidTestCompile ('com.android.support.test.espresso:espresso-core:2.2.1') {
+    androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
         exclude module: 'support-annotations'
     }
     testCompile 'junit:junit:4.12'
diff --git a/transition/build.gradle b/transition/build.gradle
index d578245..faf8483 100644
--- a/transition/build.gradle
+++ b/transition/build.gradle
@@ -5,10 +5,10 @@
 dependencies {
     compile project(':support-v4')
 
-    androidTestCompile ('com.android.support.test:runner:0.4.1') {
+    androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
         exclude module: 'support-annotations'
     }
-    androidTestCompile ('com.android.support.test.espresso:espresso-core:2.2.1') {
+    androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
         exclude module: 'support-annotations'
     }
     androidTestCompile 'org.mockito:mockito-core:1.9.5'
diff --git a/v17/leanback/build.gradle b/v17/leanback/build.gradle
index ce30e5c0..52bd161 100644
--- a/v17/leanback/build.gradle
+++ b/v17/leanback/build.gradle
@@ -5,10 +5,10 @@
 dependencies {
     compile project(':support-v4')
     compile project(':support-recyclerview-v7')
-    androidTestCompile ('com.android.support.test:runner:0.4.1') {
+    androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
         exclude module: 'support-annotations'
     }
-    androidTestCompile ('com.android.support.test.espresso:espresso-core:2.2.1') {
+    androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
         exclude module: 'support-annotations'
     }
     testCompile 'junit:junit:4.12'
diff --git a/v7/appcompat/build.gradle b/v7/appcompat/build.gradle
index 9edd016..45ec21f 100644
--- a/v7/appcompat/build.gradle
+++ b/v7/appcompat/build.gradle
@@ -7,10 +7,10 @@
     compile project(':support-vector-drawable')
     compile project(':support-animated-vector-drawable')
 
-    androidTestCompile ('com.android.support.test:runner:0.4.1') {
+    androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
         exclude module: 'support-annotations'
     }
-    androidTestCompile ('com.android.support.test.espresso:espresso-core:2.2.1') {
+    androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
         exclude module: 'support-annotations'
     }
     androidTestCompile 'org.mockito:mockito-core:1.9.5'
diff --git a/v7/gridlayout/build.gradle b/v7/gridlayout/build.gradle
index 5410363..a2c3d36 100644
--- a/v7/gridlayout/build.gradle
+++ b/v7/gridlayout/build.gradle
@@ -6,10 +6,10 @@
     compile project(':support-compat')
     compile project(':support-core-ui')
 
-    androidTestCompile ('com.android.support.test:runner:0.4.1') {
+    androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
         exclude module: 'support-annotations'
     }
-    androidTestCompile ('com.android.support.test.espresso:espresso-core:2.2.1') {
+    androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
         exclude module: 'support-annotations'
     }
     testCompile 'junit:junit:4.12'
diff --git a/v7/palette/build.gradle b/v7/palette/build.gradle
index b87a842..01ce70c 100644
--- a/v7/palette/build.gradle
+++ b/v7/palette/build.gradle
@@ -6,7 +6,7 @@
     compile project(':support-compat')
     compile project(':support-core-utils')
 
-    androidTestCompile ('com.android.support.test:runner:0.4.1') {
+    androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
         exclude module: 'support-annotations'
     }
     testCompile 'junit:junit:4.12'
diff --git a/v7/recyclerview/build.gradle b/v7/recyclerview/build.gradle
index 52ec972..a5db437 100644
--- a/v7/recyclerview/build.gradle
+++ b/v7/recyclerview/build.gradle
@@ -6,10 +6,10 @@
     compile project(':support-annotations')
     compile project(':support-compat')
     compile project(':support-core-ui')
-    androidTestCompile ('com.android.support.test:runner:0.4.1') {
+    androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
         exclude module: 'support-annotations'
     }
-    androidTestCompile ('com.android.support.test.espresso:espresso-core:2.2.1') {
+    androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
         exclude module: 'support-annotations'
     }
     testCompile 'junit:junit:4.12'