Making OUT_DIR be in the usual spot when running cleanBuild.sh from the ui/ dir

Instead of making an out dir at frameworks/out
Test: cd ui && ./cleanBuild.sh -y help && ls ../../../out
Test: cd ui && ./cleanBuild.sh -y help && ls ../../out # and notice that the dir doesn't exist

Change-Id: I498be8962c229f9965b7831bab01d2f16b8f94e7
diff --git a/cleanBuild.sh b/cleanBuild.sh
index 0672097..6e89563 100755
--- a/cleanBuild.sh
+++ b/cleanBuild.sh
@@ -59,15 +59,17 @@
 }
 confirm
 
-export OUT_DIR=../../out
+scriptDir="$(cd $(dirname $0) && pwd)"
+checkoutDir="$(cd $scriptDir/../.. && pwd)"
+export OUT_DIR="$checkoutDir/out"
 function removeCaches() {
   echo removing caches
   rm -rf .gradle
   rm -rf buildSrc/.gradle
   rm -f local.properties
-  rm -rf ../../out
+  rm -rf $OUT_DIR
 }
 removeCaches
 
 echo running build
-GRADLE_USER_HOME=../../out ./gradlew --no-daemon $goals
+./gradlew --no-daemon $goals