Cloud Continuous Integration service.
Greetings, everyone! Today I’m going to show you how to create a configuration for Vexor CI in order to automate the assembling of Android applications.
Let me start from the configuration itself:
language: java cache: directories: - ~/android-sdk-linux - ~/.gradle before_install: - sudo apt-get --yes -qq install lib32stdc++6 lib32z1 install: - test -f ~/android-sdk-linux/SDK\ Readme.txt || ( wget -O - http://dl.google.com/android/android-sdk_r24.0.2-linux.tgz | tar xz -C ~ && echo y | ~/android-sdk-linux/tools/android update sdk --no-ui --all --filter platform-tools,build-tools-21.1.2,android-21,extra-android-m2repository ) script: - ANDROID_HOME=~/android-sdk-linux ./gradlew --quiet assembleRelease
Shown Android configuration is unavailable in Vexor Ci at the moment, that’s why in “project settings” I’ve chosen “scala” as most common option, and mentioned that target language as java.
Next, interesting thing begins - cache. Vexor CI knows how to put the specified paths to the archive after the “Job” has been completed and deploy this archive at the next assembly. We are going to use this feature in order to avoid Android SDK and Gradle download every time anew; this will help us to save assembly time.
The lib32stdc++6 and lib32z1 packages are needed to run appt utility from SDK. Long line in “install” checks for cached Android SDK, and if it’s missing, SDK archive is beeing downloaded, unpacked and updates with packages installation. You can find the list of all available packages by this:
./android-sdk-linux/tools/android list sdk --extended -all
And, in the end, script just starts assembling in Gradle.
Author - Pavel Perestoronin
In software engineering, continuous integration (CI) is the practice of merging all developer working copies to a shared mainline several times a day. There are a lot of different continious integration solutions with strong and weak sides.
Take part in the survey of our portal. Which Continuous integration system do you use?