Clean up doclava gradle target

1. Removes dependency on internal BuildUtils
2. Uses maven prebuilts for antlr and tagsoup

Change-Id: Ic8d872b3d19f7fcee2e4d035c90706e954208060
(cherry picked from commit 4230fe194b6e52ddeaf50ddef0246a92680ba5ca)
diff --git a/build.gradle b/build.gradle
index 0fdc5d1..de34436 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,6 +1,6 @@
 apply plugin: 'java'
 
-import com.android.internal.BuildUtils
+import javax.tools.ToolProvider
 
 sourceSets {
     main {
@@ -13,17 +13,9 @@
     }
 }
 
-// TODO put this function in a plugin
-// TODO remove when prebuilt's case will always properly work with BuildUtils's version.
-String findToolsJar() {
-    new ByteArrayOutputStream().withStream { os ->
-        project.exec {
-            executable "../../build/core/find-jdk-tools-jar.sh"
-
-            standardOutput = os
-        }
-        return os.toString().trim()
-    }
+dependencies {
+    // tools.jar required for com.sun.javadoc
+    compile files(((URLClassLoader) ToolProvider.getSystemToolClassLoader()).getURLs())
 }
 
 if (project.hasProperty("usePrebuilts") && project.usePrebuilts == "true") {
@@ -31,20 +23,15 @@
         maven { url '../../prebuilts/tools/common/m2/repository' }
     }
 
-    // TODO refactor to allow referencing the "gradle way"
     dependencies {
-        compile files(findToolsJar())
-        compile files('../../prebuilts/misc/common/antlr/antlr-3.4-complete.jar')
+        compile 'org.antlr:antlr:3.5.2'
         compile 'com.google.jsilver:jsilver:1.0.0'
-        // TODO add tagsoup to prebuils to fully support building using prebuilts
-        compile project(':tagsoup')
+        compile 'org.ccil.cowan.tagsoup:tagsoup:1.2.1'
         // required by jsilver
         compile 'com.google.guava:guava:15.0'
-        //compile project(path: ':junit', configuration: 'target')
     }
 } else {
     dependencies {
-        compile files(BuildUtils.findToolsJar(project))
         compile project(path: ':antlr', configuration: 'antlrRuntime')
         compile project(':jsilver')
         compile project(':tagsoup')