chiark / gitweb /
Update SDK build tools to 24.0.1
authorFredrik Fornwall <fredrik@fornwall.net>
Tue, 26 Jul 2016 11:23:39 +0000 (07:23 -0400)
committerFredrik Fornwall <fredrik@fornwall.net>
Tue, 26 Jul 2016 11:23:39 +0000 (07:23 -0400)
build-package.sh
packages/dx/build.sh
packages/dx/dx
packages/jack/build.sh
scripts/setup-android-sdk.sh

index eb44cd8bafc836d781bf6f689bef9752e34583f4..c670f37ddf91f79b71f26ccca034879489466c0b 100755 (executable)
@@ -17,7 +17,7 @@ test -f $HOME/.termuxrc && . $HOME/.termuxrc
 : ${TERMUX_DEBUG:=""}
 : ${TERMUX_PROCESS_DEB:=""}
 : ${TERMUX_API_LEVEL:="21"}
-: ${TERMUX_ANDROID_BUILD_TOOLS_VERSION:="23.0.3"}
+: ${TERMUX_ANDROID_BUILD_TOOLS_VERSION:="24.0.1"}
 : ${TERMUX_NDK_VERSION:="12"}
 
 # Handle command-line arguments:
@@ -97,6 +97,8 @@ test -t 1 && printf "\033]0;$1...\007"
 # to avoid stuff like arm-linux-androideabi-ld there to conflict with ones from
 # the standalone toolchain.
 TERMUX_DX=$ANDROID_HOME/build-tools/$TERMUX_ANDROID_BUILD_TOOLS_VERSION/dx
+TERMUX_JACK=$ANDROID_HOME/build-tools/$TERMUX_ANDROID_BUILD_TOOLS_VERSION/jack.jar
+TERMUX_JILL=$ANDROID_HOME/build-tools/$TERMUX_ANDROID_BUILD_TOOLS_VERSION/jill.jar
 
 # We put this after system PATH to avoid picking up toolchain stripped python
 export PATH=$PATH:$TERMUX_STANDALONE_TOOLCHAIN/bin
index 411b7a2adf516644b28ff1fc77d06dbcb4fe1c0e..a225d132c7762dc3221fb0b70809c8468b959902 100755 (executable)
@@ -1,15 +1,22 @@
 TERMUX_PKG_HOMEPAGE=http://developer.android.com/tools/help/index.html
 TERMUX_PKG_DESCRIPTION="Command which takes in class files and reformulates them for usage on Android"
 TERMUX_PKG_VERSION=$TERMUX_ANDROID_BUILD_TOOLS_VERSION
-TERMUX_PKG_BUILD_REVISION=1
 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
+       java -jar $TERMUX_JACK \
+               --output-dex $TERMUX_PKG_TMPDIR \
+               --import $DX_JACK
+
         mkdir -p $TERMUX_PREFIX/share/dex
-        $TERMUX_DX \
-                --dex \
-                --output=$TERMUX_PREFIX/share/dex/dx.jar \
-                $ANDROID_HOME/build-tools/${TERMUX_PKG_VERSION}/lib/dx.jar
+       mv $TERMUX_PKG_TMPDIR/classes.dex $TERMUX_PREFIX/share/dex/dx.dex
 
        install $TERMUX_PKG_BUILDER_DIR/dx $TERMUX_PREFIX/bin/dx
        perl -p -i -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PREFIX/bin/dx
index 242feb268b2712aa885bafa5fb89b01da96a02f0..15b809d8802828fe4f053152712ce43b25424f46 100755 (executable)
@@ -2,5 +2,5 @@
 
 exec dalvikvm \
        -Xmx256m \
-       -cp @TERMUX_PREFIX@/share/dex/dx.jar \
+       -cp @TERMUX_PREFIX@/share/dex/dx.dex \
        com.android.dx.command.Main $@
index b29a8df5092f41a3057ae0e313ce12b94580e63a..4dfb4cfbdeb753eedaa564095720b120dd70f9c2 100755 (executable)
@@ -3,8 +3,7 @@
 # perhaps because BatchProcessingEnvImpl uses javax.tools which does not exist on android?
 TERMUX_PKG_HOMEPAGE=http://tools.android.com/tech-docs/jackandjill
 TERMUX_PKG_DESCRIPTION="Java Android Compiler Kit"
-TERMUX_PKG_VERSION="1.1-mr2"
-TERMUX_PKG_BUILD_REVISION=4
+TERMUX_PKG_VERSION=$TERMUX_ANDROID_BUILD_TOOLS_VERSION
 TERMUX_PKG_PLATFORM_INDEPENDENT=true
 
 termux_step_make () {
index ebb87a2cc3fa351c3a3a5cf7f37298c61964f082..e648cfcc70c31403d6e666d6ec0880b63b3dd65c 100755 (executable)
@@ -38,4 +38,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-23.0.3,android-23"
+echo y | $ANDROID_HOME/tools/android update sdk --no-ui --all --no-https -t "build-tools-24.0.1,android-23"