summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Bendowski <bendowski@google.com>2015-06-11 11:18:48 +0100
committerMichal Bendowski <bendowski@google.com>2015-08-25 09:53:37 +0100
commit4a2a7f37e6c95d5f07e411e1bb5f5c9b890a7ed0 (patch)
treeed6862557271e5e7e1ff97b836875c3cfd4fbbc8
parent2f9a77c9ec313fd09eb831c606069f748213f67c (diff)
downloadvolley-4a2a7f37e6c95d5f07e411e1bb5f5c9b890a7ed0.tar.gz
Retry: Specify test dependecies in rules.gradle
Now that tests are using Robolectric 3, it should not break the internal build. This also updates the android gradle plugin. The block is wrapped in an if statement, in case someone using plugin version 1.0 includes rules.gradle. Change-Id: Ib054e2d39cf1e3bc0746740659f4e5449b2e1375
-rw-r--r--build.gradle6
-rw-r--r--rules.gradle9
2 files changed, 14 insertions, 1 deletions
diff --git a/build.gradle b/build.gradle
index 83acd6d..9f973c1 100644
--- a/build.gradle
+++ b/build.gradle
@@ -19,12 +19,16 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.3'
+ classpath 'com.android.tools.build:gradle:1.3.1'
}
}
apply plugin: 'com.android.library'
+repositories {
+ jcenter()
+}
+
android {
compileSdkVersion 22
buildToolsVersion = '22.0.1'
diff --git a/rules.gradle b/rules.gradle
index 40508d0..04dd681 100644
--- a/rules.gradle
+++ b/rules.gradle
@@ -1,3 +1,12 @@
// See build.gradle for an explanation of what this file is.
apply plugin: 'com.android.library'
+
+// Check if the android plugin version supports unit testing.
+if (configurations.findByName("testCompile")) {
+ dependencies {
+ testCompile "junit:junit:4.10"
+ testCompile "org.mockito:mockito-core:1.9.5"
+ testCompile "org.robolectric:robolectric:3.0"
+ }
+}