commit | 652fb8eda4d859ec823d7b8444512e2e50e6e9d1 | [log] [tgz] |
---|---|---|
author | Alexander Afanasyev <alexander.afanasyev@ucla.edu> | Fri Jul 07 10:46:09 2017 -0700 |
committer | Alexander Afanasyev <alexander.afanasyev@ucla.edu> | Mon Jul 17 15:39:22 2017 +0200 |
tree | 03bdcf15031a2d7e5877a3cfab2a207940b42513 | |
parent | a2a340f69b683b5823043bb7729267ad8fbca26c [diff] |
Upgrade instructions to use 16.04 slave and openjdk-8 Change-Id: I4ce3a4b3a89212b44e1bd4c9204f57f91a232304
To compile code, the following is necessary
Example script for Ubuntu 16.04 to get all dependencies, download SDK and NDK:
CRYSTAX_NDK_VERSION=10.3.1 SDK_VERSION=24.4.1 OPENSSL_VERSION=1.0.2h BUILD_TOOLS_VERSION=23.0.2 COMPILE_SDK_VERSION=23 sudo apt -q update sudo apt -qy upgrade sudo apt-get install -y build-essential git openjdk-8-jdk unzip sudo apt-get install -y lib32stdc++6 lib32z1 lib32z1-dev wget https://www.crystax.net/download/crystax-ndk-$CRYSTAX_NDK_VERSION-linux-x86_64.tar.xz tar xf crystax-ndk-$CRYSTAX_NDK_VERSION-linux-x86_64.tar.xz rm crystax-ndk-$CRYSTAX_NDK_VERSION-linux-x86_64.tar.xz wget http://dl.google.com/android/android-sdk_r$SDK_VERSION-linux.tgz tar zxf android-sdk_r$SDK_VERSION-linux.tgz rm android-sdk_r$SDK_VERSION-linux.tgz export ANDROID_HOME=`pwd`/android-sdk-linux export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools echo "y" | android update sdk --filter platform-tools,build-tools-$BUILD_TOOLS_VERSION,android-$COMPILE_SDK_VERSION,extra-android-m2repository,extra-google-m2repository --no-ui --all --force echo "y" | android update sdk --filter "android-19" --no-ui --all --force
To create prebuilt OpenSSL libraries:
git clone https://github.com/crystax/android-vendor-openssl.git cd crystax-ndk-$CRYSTAX_NDK_VERSION ./build/tools/build-target-openssl.sh ../android-vendor-openssl/ cp sources/openssl/1.0.1p/Android.mk -o sources/openssl/$OPENSSL_VERSION/Android.mk
Alternatively, you can use precompiled versions (currently, available for CrystaX NDK 10.3.1 only):
cd crystax-ndk-10.3.1/sources curl -L -o openssl.tar.gz https://github.com/named-data-mobile/crystax-prebuilt-openssl/archive/crystax-10.3.1.tar.gz tar zx --strip-components 1 -C openssl -f openssl.tar.gz rm openssl.tar.gz
git clone --recursive http://gerrit.named-data.net/NFD-android echo sdk.dir=`pwd`/android-sdk-linux > NFD-android/local.properties echo ndk.dir=`pwd`/crystax-ndk-10.3.1 >> NFD-android/local.properties cd NFD-android ./gradlew assembleRelease
The development setup can be set up with Vagrant and scripts provided in .vagrant/
folder. After vagrant command-line is installed, the following will create VM environment and fetch all necessary dependencies:
cd .vagrant vagrant up vagrant ssh
Refer to vagrant documentation for more information.