-
-
Notifications
You must be signed in to change notification settings - Fork 86
How to build TumCampusApp
Execute the following commands to download the TumCampusApp repository:
git clone https://github.com/TCA-Team/TumCampusApp.git --depth 1
You can also download the whole history of this project by omitting the "--depth 1" option, but git then downloads ~120MB instead of ~6MB of data
In order to be able to build the app, you should download the following SDK components:
- Android SDK tools, Android SDK platform-tools and Android SDK Build-tools
- The latest version of the Android SDK platform
- Android support repository
- Android support library
- Google Repository
- Google Play services
There are several different tools available for building TumCampusApp. You only have to choose one of them.
- In the welcome screen of Android Studio, go to QuickStart -> Open an existing Android Studio project
- Select the root directoy of the TumCampusApp repository and click "OK".
- To enable Git integration, add a Git root, by selecting "Add Root" in the Android Studio popup
This is the way, we configured our build server.
You probably need a JDK, openjdk-8-jdk
seems to work great.
Download and extract the latest android-sdk to /opt
, e.g.:
cd /opt
wget dl.google.com/android/android-sdk_r24.4.1-linux.tgz
tar -xf android-sdk_r24.4.1-linux.tgz
Give the user / group (jenkins in our setup) you want to build things with correct permissions for the sdk
chgrp -R jenkins /opt/android-sdk-linux
chmod g+w /opt/android-sdk-linux
Now add the SDK to your PATH
echo '
#export the location of the android sdk
export ANDROID_HOME="/opt/android-sdk-linux"
export PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools"
' > /etc/profile.d/android.sh
Now the user jenkins should be able to build the project and update the SDK automatically. However, if you get license warnings and aborted builds, you might need to update your $ANDROID_HOME/licenses/android-sdk-license
(see Googles documentation)