-
Notifications
You must be signed in to change notification settings - Fork 14
Building
DroidMate is built with Gradle. A Gradle wrapper executable (gradlew) is shipped with DroidMate.
Each DroidMate commit is built with Travis CI, a continuous integration server. You can use it as a reference to troubleshoot your local build setup. Travis CI configuration file: repo/.travis.yml
. To view the full, detailed log of the build done on the CI server, click on this label => .
To be able to build DroidMate on your local machine, you will need JDK, Android SDK with Android 6 and 7.1, gnuplot 5 with pdf
terminal and some environment variables set to appropriate values.
To configure your local setup, do the following:
-
Install Java Development Kit (JDK) 8. Set
JAVA_HOME
environment variable to point to its location. -
Install Android SDK. Set
ANDROID_HOME
environment variable to point to its location.- On Mac OS X you can run the following command:
brew cask install android-sdk
AH=/usr/local/Caskroom/android-sdk/`ls /usr/local/Caskroom/android-sdk/`
echo "export ANDROID_HOME=\"$AH\"" >>${HOME}/.bash_profile
- Install gnuplot 5.0 or newer, e.g. from sourceforge and add
gnuplot/bin
directory to thePATH
environment variable.- On Mac OS X you will have to install gnuplot together with
pdf
terminal. Using homebrew you can do this by doingbrew install gnuplot --with-cairo
.
- On Mac OS X you will have to install gnuplot together with
- Run SDK Manager of Android SDK with admin rights. Select and install the following packages:
-
Tools / Android SDK Platform-tools 27.0.3
-
Tools / Android SDK Build-tools
-
Android 6.0 (API 23) / SDK Platform
-
Android 7.1 (API 25) / SDK Platform
-
Extras / Android Support Repository
-
Extras / Google Play services
-
Extras / Google USB Driver (if your OS requires it)
-
Extras / Intel x86 Emulator Accelerator (HAXM Installer) (if you want to use emulator on Windows)
-
You can use the following command to install these packages:
-
sdkmanager "build-tools;27.0.3" "tools" "platforms;android-23" "platforms;android-25" "extras;android;m2repository" "extras;google;google_play_services" "extras;intel;Hardware_Accelerated_Execution_Manager" "platform-tools"
- Android 6.0 (API 23) / Sources for Android SDK (optional, but recommended)
- Android 6.0 (API 23) / Documentation for Android SDK (optional, but recommended)
- Android 7.1 (API 25) / Sources for Android SDK (optional, but recommended)
- Android 7.1 (API 25) / Documentation for Android SDK (optional, but recommended)
After clonning the repository, to build DroidMate execute:
./gradlew build
If the OS doesn't allow the Gradle wrapper to be executed run: chmod +x gradlew
Gradle will automatically download all dependencies (libraries), compile and execute the regression tests which do not require an Android device. If the last step finished with BUILD SUCCESSFUL
you successfully built DroidMate.
To build DroidMate without executing the tests use:
./gradlew build -x test
To run tests without building DroidMate use:
./gradlew test
While Gradle automatically identifies and recompile changes in your source code during the build task, you can force it to recompile all files using:
./gradlew clean build
This will ensure that your compiled files are up-to-date.