1
0
mirror of https://github.com/termux/termux-packages synced 2024-06-14 03:36:39 +00:00

Update SDK build tools to 24.0.1

This commit is contained in:
Fredrik Fornwall 2016-07-26 07:23:39 -04:00
parent fab303e8ce
commit 382cfb780c
5 changed files with 18 additions and 10 deletions

View File

@ -17,7 +17,7 @@ test -f $HOME/.termuxrc && . $HOME/.termuxrc
: ${TERMUX_DEBUG:=""} : ${TERMUX_DEBUG:=""}
: ${TERMUX_PROCESS_DEB:=""} : ${TERMUX_PROCESS_DEB:=""}
: ${TERMUX_API_LEVEL:="21"} : ${TERMUX_API_LEVEL:="21"}
: ${TERMUX_ANDROID_BUILD_TOOLS_VERSION:="23.0.3"} : ${TERMUX_ANDROID_BUILD_TOOLS_VERSION:="24.0.1"}
: ${TERMUX_NDK_VERSION:="12"} : ${TERMUX_NDK_VERSION:="12"}
# Handle command-line arguments: # 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 # to avoid stuff like arm-linux-androideabi-ld there to conflict with ones from
# the standalone toolchain. # the standalone toolchain.
TERMUX_DX=$ANDROID_HOME/build-tools/$TERMUX_ANDROID_BUILD_TOOLS_VERSION/dx 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 # We put this after system PATH to avoid picking up toolchain stripped python
export PATH=$PATH:$TERMUX_STANDALONE_TOOLCHAIN/bin export PATH=$PATH:$TERMUX_STANDALONE_TOOLCHAIN/bin

View File

@ -1,15 +1,22 @@
TERMUX_PKG_HOMEPAGE=http://developer.android.com/tools/help/index.html 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_DESCRIPTION="Command which takes in class files and reformulates them for usage on Android"
TERMUX_PKG_VERSION=$TERMUX_ANDROID_BUILD_TOOLS_VERSION TERMUX_PKG_VERSION=$TERMUX_ANDROID_BUILD_TOOLS_VERSION
TERMUX_PKG_BUILD_REVISION=1
TERMUX_PKG_PLATFORM_INDEPENDENT=true TERMUX_PKG_PLATFORM_INDEPENDENT=true
termux_step_make_install () { 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 mkdir -p $TERMUX_PREFIX/share/dex
$TERMUX_DX \ mv $TERMUX_PKG_TMPDIR/classes.dex $TERMUX_PREFIX/share/dex/dx.dex
--dex \
--output=$TERMUX_PREFIX/share/dex/dx.jar \
$ANDROID_HOME/build-tools/${TERMUX_PKG_VERSION}/lib/dx.jar
install $TERMUX_PKG_BUILDER_DIR/dx $TERMUX_PREFIX/bin/dx install $TERMUX_PKG_BUILDER_DIR/dx $TERMUX_PREFIX/bin/dx
perl -p -i -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PREFIX/bin/dx perl -p -i -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PREFIX/bin/dx

View File

@ -2,5 +2,5 @@
exec dalvikvm \ exec dalvikvm \
-Xmx256m \ -Xmx256m \
-cp @TERMUX_PREFIX@/share/dex/dx.jar \ -cp @TERMUX_PREFIX@/share/dex/dx.dex \
com.android.dx.command.Main $@ com.android.dx.command.Main $@

View File

@ -3,8 +3,7 @@
# perhaps because BatchProcessingEnvImpl uses javax.tools which does not exist on android? # perhaps because BatchProcessingEnvImpl uses javax.tools which does not exist on android?
TERMUX_PKG_HOMEPAGE=http://tools.android.com/tech-docs/jackandjill TERMUX_PKG_HOMEPAGE=http://tools.android.com/tech-docs/jackandjill
TERMUX_PKG_DESCRIPTION="Java Android Compiler Kit" TERMUX_PKG_DESCRIPTION="Java Android Compiler Kit"
TERMUX_PKG_VERSION="1.1-mr2" TERMUX_PKG_VERSION=$TERMUX_ANDROID_BUILD_TOOLS_VERSION
TERMUX_PKG_BUILD_REVISION=4
TERMUX_PKG_PLATFORM_INDEPENDENT=true TERMUX_PKG_PLATFORM_INDEPENDENT=true
termux_step_make () { termux_step_make () {

View File

@ -38,4 +38,4 @@ if [ ! -d $NDK ]; then
rm ndk.zip rm ndk.zip
fi 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"