am 76590338: am a0fc8d57: am 2c119d8e: am 8714f8c8: am 74512bea: Fix a NPE in the type parameter checking in stubs

* commit '7659033819ea66f56697a71d1dc2bce7ccdb413a':
  Fix a NPE in the type parameter checking in stubs
diff --git a/build.gradle b/build.gradle
index 79d856e..382e10d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -14,7 +14,7 @@
 String findToolsJar() {
     new ByteArrayOutputStream().withStream { os ->
         project.exec {
-            executable "$rootDir/build/core/find-jdk-tools-jar.sh"
+            executable "../../build/core/find-jdk-tools-jar.sh"
 
             standardOutput = os
         }
@@ -22,9 +22,27 @@
     }
 }
 
-dependencies {
-    compile files(findToolsJar())
-    compile project(path: ':antlr', configuration: 'antlrRuntime')
-    compile project(':jsilver')
-    compile project(':tagsoup')
-}
\ No newline at end of file
+
+if (project.hasProperty("usePrebuilts") && project.usePrebuilts == "true") {
+    repositories {
+        maven { url '../../prebuilts/tools/common/m2/repository' }
+    }
+
+    dependencies {
+        compile files(findToolsJar())
+        compile files('../../prebuilts/misc/common/antlr/antlr-3.4-complete.jar')
+        compile 'com.google.jsilver:jsilver:1.0.0'
+        // TODO add tagsoup to prebuils to fully support building using prebuilts
+        compile project(':tagsoup')
+        // required by jsilver
+        compile 'com.google.guava:guava:15.0'
+        //compile project(path: ':junit', configuration: 'target')
+    }
+} else {
+    dependencies {
+        compile files(findToolsJar())
+        compile project(path: ':antlr', configuration: 'antlrRuntime')
+        compile project(':jsilver')
+        compile project(':tagsoup')
+    }
+}