buildserver: do not set NDK env vars, they are handled by fdroid build

`fdroid build` handles setting the NDK env vars since the NDK version can
change depending on the app being build.  Unlike ANDROID_HOME, there is no
single global NDK location.  The NDK installs are all versioned.
This commit is contained in:
Hans-Christoph Steiner 2016-06-17 11:29:00 +02:00
parent a88771cf30
commit 226237c5f7
3 changed files with 11 additions and 16 deletions

View File

@ -3,15 +3,12 @@
set -e
if [ -z $ANDROID_NDK_HOME ]; then
echo "ANDROID_NDK_HOME env var must be set!"
exit 1
fi
NDK_BASE=$1
test -e $ANDROID_NDK_HOME || mkdir -p $ANDROID_NDK_HOME
cd $ANDROID_NDK_HOME
test -e $NDK_BASE || mkdir -p $NDK_BASE
cd $NDK_BASE
if [ ! -e $ANDROID_NDK_HOME/r9b ]; then
if [ ! -e $NDK_BASE/r9b ]; then
if [ `uname -m` == 'x86_64' ] ; then
SUFFIX='_64'
else
@ -22,7 +19,7 @@ if [ ! -e $ANDROID_NDK_HOME/r9b ]; then
mv android-ndk-r9b r9b
fi
if [ ! -e $ANDROID_NDK_HOME/r10e ]; then
if [ ! -e $NDK_BASE/r10e ]; then
if [ `uname -m` == 'x86_64' ] ; then
SUFFIX='_64'
else
@ -32,5 +29,5 @@ if [ ! -e $ANDROID_NDK_HOME/r10e ]; then
mv android-ndk-r10e r10e
fi
chmod -R a+rX $ANDROID_NDK_HOME/
find $ANDROID_NDK_HOME/ -type f -executable -print0 | xargs -0 chmod a+x
chmod -R a+rX $NDK_BASE/
find $NDK_BASE/ -type f -executable -print0 | xargs -0 chmod a+x

View File

@ -10,7 +10,6 @@ bsenv=/etc/profile.d/bsenv.sh
echo "# generated on "`date` > $bsenv
echo export ANDROID_HOME=$1 >> $bsenv
echo export ANDROID_NDK_HOME=$2 >> $bsenv
echo 'export PATH=$PATH:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:/opt/gradle/bin' >> $bsenv
chmod 0644 $bsenv

View File

@ -377,10 +377,8 @@ if config['apt_package_cache']:
vagrantfile += """
config.vm.provision "shell" do |shell|
shell.path = "setup-env-vars"
shell.args = ["/home/vagrant/android-sdk", "/home/vagrant/android-ndk"]
end
config.vm.provision "shell", path: "setup-env-vars",
args: ["/home/vagrant/android-sdk"]
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
@ -397,7 +395,8 @@ vagrantfile += """
end
config.vm.provision "shell", path: "provision-android-sdk"
config.vm.provision "shell", path: "provision-android-ndk"
config.vm.provision "shell", path: "provision-android-ndk",
args: ["/home/vagrant/android-ndk"]
config.vm.provision "shell", path: "provision-gradle"
config.vm.provision "file", source: "gradle",
destination: "/opt/gradle/bin/gradle"