[Android] Download BuildTools/AndroidSupport

Jean-Baptiste Kempf git at videolan.org
Fri Feb 6 19:54:19 CET 2015


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Feb  6 19:51:17 2015 +0100| [30cebe79c09ac646073de03786fed6c9a875e47d] | committer: Jean-Baptiste Kempf

Download BuildTools/AndroidSupport

Gradle does not fetch those, for no reason, but it enforces the numbers.
Therefore, here is a way to get them, without the UI.

This is not activated by default, because I have not found the way to
download without redownloading if present

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=30cebe79c09ac646073de03786fed6c9a875e47d
---

 compile.sh |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/compile.sh b/compile.sh
index 43f6f0b..4d6a7c3 100755
--- a/compile.sh
+++ b/compile.sh
@@ -88,6 +88,16 @@ if [ ! -d "gradle/wrapper" ]; then
     rm -rf gradle-${GRADLE_VERSION}-all.zip gradle-${GRADLE_VERSION}
 fi
 
+###############################
+# Install Gradle dependencies
+###############################
+if [ ! -z "$BUILD_TOOLS" ]; then
+    SUPPORT=`$ANDROID_SDK/tools/android list sdk -u --all  | grep -i support | cut -d'-' -f1 | xargs | sed 's/ /,/g'`
+    echo "y" | $ANDROID_SDK/tools/android update sdk --no-ui --all --filter $SUPPORT
+    BUILDTOOLS=`$ANDROID_SDK/tools/android list sdk -u --all  | grep -i 21.1.1 | cut -d'-' -f1`
+    echo "y" | $ANDROID_SDK/tools/android update sdk --no-ui --all --filter $BUILDTOOLS
+fi
+
 ####################
 # Configure gradle #
 ####################



More information about the Android mailing list