am 901b8ca0: Merge "Add host target to support vogar-run tests"
* commit '901b8ca001d97d55f55464a7647d3c264221526c':
Add host target to support vogar-run tests
diff --git a/build.gradle b/build.gradle
index 6e0a62e..722846c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -30,13 +30,6 @@
}
}
-dependencies {
- targetCompile getAndroidPrebuilt('4')
- targetCompile project(':hamcrest')
-
- hostCompile project(':hamcrest')
-}
-
task targetJar(type: Jar) {
from sourceSets.target.output
dependsOn targetClasses
@@ -55,3 +48,23 @@
host hostJar
target targetJar
}
+
+if (project.hasProperty("usePrebuilts") && project.usePrebuilts == "true") {
+ repositories {
+ maven { url '../../prebuilts/tools/common/m2/repository' }
+ }
+
+ dependencies {
+ targetCompile getAndroidPrebuilt('4')
+ targetCompile 'org.hamcrest:hamcrest-core:1.1'
+
+ hostCompile 'org.hamcrest:hamcrest-core:1.1'
+ }
+} else {
+ dependencies {
+ targetCompile getAndroidPrebuilt('4')
+ targetCompile project(':hamcrest')
+
+ hostCompile project(':hamcrest')
+ }
+}