chiark / gitweb /
Update the android sdk build tools used
authorFredrik Fornwall <fredrik@fornwall.net>
Thu, 2 Feb 2017 00:39:29 +0000 (01:39 +0100)
committerFredrik Fornwall <fredrik@fornwall.net>
Thu, 2 Feb 2017 00:39:29 +0000 (01:39 +0100)
The docker image has been rebuilt, so ./scripts/update-docker.sh
should be used.

build-package.sh
packages/dx/build.sh
scripts/setup-android-sdk.sh

index 9d0c8c82714121fab8e0157e8e46408b3dcab0ca..17a46b82ab94fd417c4e6a808caa2b9adddfdc53 100755 (executable)
@@ -172,7 +172,7 @@ termux_step_setup_variables() {
        : "${TERMUX_ANDROID_HOME:="/data/data/com.termux/files/home"}"
        : "${TERMUX_DEBUG:=""}"
        : "${TERMUX_API_LEVEL:="21"}"
-       : "${TERMUX_ANDROID_BUILD_TOOLS_VERSION:="24.0.1"}"
+       : "${TERMUX_ANDROID_BUILD_TOOLS_VERSION:="25.0.1"}"
        : "${TERMUX_NDK_VERSION:="13"}"
 
        if [ "x86_64" = "$TERMUX_ARCH" ] || [ "aarch64" = "$TERMUX_ARCH" ]; then
index a225d132c7762dc3221fb0b70809c8468b959902..10771d9a6669029cdf49bccc8af8fafb19bb3c73 100755 (executable)
@@ -6,16 +6,12 @@ TERMUX_PKG_PLATFORM_INDEPENDENT=true
 termux_step_make_install () {
        # As of build tools 24 the dx tool is implemented using java 8, but
        # as dx itself does not support java 8 (class file format 52)
-       # we go the .class -> jill -> jack route.
-       local DX_JACK=$TERMUX_PKG_TMPDIR/dx.jack
-       java -jar $TERMUX_JILL \
-               --output=$DX_JACK \
-               $ANDROID_HOME/build-tools/${TERMUX_PKG_VERSION}/lib/dx.jar
+       # we use jack:
        java -jar $TERMUX_JACK \
                --output-dex $TERMUX_PKG_TMPDIR \
-               --import $DX_JACK
+               --import $ANDROID_HOME/build-tools/${TERMUX_PKG_VERSION}/lib/dx.jar
 
-        mkdir -p $TERMUX_PREFIX/share/dex
+       mkdir -p $TERMUX_PREFIX/share/dex
        mv $TERMUX_PKG_TMPDIR/classes.dex $TERMUX_PREFIX/share/dex/dx.dex
 
        install $TERMUX_PKG_BUILDER_DIR/dx $TERMUX_PREFIX/bin/dx
index c1038e0fca45509ff31cbd8062728366762e51e8..54bc68dab8654a526a64775fab6c263a82e33129 100755 (executable)
@@ -11,19 +11,10 @@ if [ ! -d $ANDROID_HOME ]; then
        cd $ANDROID_HOME/..
        rm -Rf `basename $ANDROID_HOME`
 
-        if [ `uname` = Darwin ]; then
-                curl --fail --retry 3 -o android-sdk.zip https://dl.google.com/android/android-sdk_r24.4.1-macosx.zip
-                rm -Rf android-sdk-macosx
-                unzip -q android-sdk.zip
-                mv android-sdk-macosx `basename $ANDROID_HOME`
-                rm android-sdk.zip
-        else
-                curl --fail --retry 3 -o android-sdk.tgz https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
-                rm -Rf android-sdk-linux
-                tar xzf android-sdk.tgz
-                mv android-sdk-linux `basename $ANDROID_HOME`
-                rm android-sdk.tgz
-        fi
+       curl --fail --retry 3 -o tools.zip https://dl.google.com/android/repository/tools_r25.2.3-linux.zip
+       rm -Rf tools android-sdk
+       unzip -q tools.zip -d android-sdk
+       rm tools.zip
 fi
 
 if [ ! -d $NDK ]; then
@@ -31,7 +22,8 @@ if [ ! -d $NDK ]; then
        cd $NDK/..
        rm -Rf `basename $NDK`
        NDK_VERSION=r13
-       curl --fail --retry 3 -o ndk.zip http://dl.google.com/android/repository/android-ndk-${NDK_VERSION}-`uname`-x86_64.zip
+       curl --fail --retry 3 -o ndk.zip \
+               http://dl.google.com/android/repository/android-ndk-${NDK_VERSION}-`uname`-x86_64.zip
 
        rm -Rf android-ndk-$NDK_VERSION
        unzip -q ndk.zip
@@ -39,4 +31,4 @@ if [ ! -d $NDK ]; then
        rm ndk.zip
 fi
 
-echo y | $ANDROID_HOME/tools/android update sdk --no-ui --all --no-https -t "build-tools-24.0.1,android-24"
+echo y | $ANDROID_HOME/tools/android update sdk --no-ui --all --no-https -t "build-tools-25.0.1,android-24"