Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

How to build TumCampusApp

Kordian Bruck edited this page Aug 9, 2017 · 1 revision

Building TumCampusApp

Step 1: Clone the repository

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

Step 2: Set up the Android SDK

In order to be able to build the app, you should download the following SDK components:

Step 3: Set up build system

There are several different tools available for building TumCampusApp. You only have to choose one of them.

Building in Android Studio (recommended)

  • 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

Building on the command-line with gradle (e.g. for a build server)

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)

Clone this wiki locally