This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'json' | |
require 'optparse' | |
# Wrapper to run commands | |
def run_cmd(cmd, verbose = false) | |
puts " [executing] #{cmd}" if verbose | |
%x[ #{cmd} ] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies: | |
pre: | |
# Android SDK Platform 24 | |
- if [ ! -d "/usr/local/android-sdk-linux/platforms/android-24" ]; then echo y | android update sdk --no-ui --all --filter "android-24"; fi | |
# Android SDK Build-tools, revision 25.0.1 | |
- if [ ! -d "/usr/local/android-sdk-linux/build-tools/25.0.1" ]; then echo y | android update sdk --no-ui --all --filter "build-tools-25.0.1"; fi | |
# Android Support Repository, revision 40 / Local Maven repository for Support Libraries | |
- if [ ! -d "/usr/local/android-sdk-linux/extras/android/m2repository/com/android/support/support-v4/25.0.1" ]; then echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"; fi | |
# Google Support Repository, revision 40 / Local Maven repository for Support Libraries | |
- if [ ! -d "/usr/local/android-sdk-linux/extras/google/m2repository/com/google/firebase/firebase-core/10.0.1" ]; then echo y | android update sdk --no-ui --all --filter "extra-google-m2repository"; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install android build tools, platforms | |
#Supported versions here https://circleci.com/docs/android | |
dependencies: | |
override: | |
- echo y | android update sdk --no-ui --all --filter tools,platform-tools,build-tools-23.0.1,android-23,extra-google-m2repository,extra-google-google_play_services,extra-android-support | |
- ANDROID_HOME=/usr/local/android-sdk-linux ./gradlew dependencies | |
#Pull any submodules | |
checkout: | |
post: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Android build configuration for CircleCI.com | |
# | |
general: | |
artifacts: | |
- /home/ubuntu/your-app-name/app/build/outputs/apk/ | |
machine: | |
environment: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
machine: | |
environment: | |
TERM: "dumb" | |
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx5120m -XX:+HeapDumpOnOutOfMemoryError"' | |
ANDROID_HOME: /usr/local/android-sdk-linux | |
java: | |
version: | |
oraclejdk8 | |
dependencies: | |
pre: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BasedOnStyle: Webkit | |
BreakBeforeBraces: Allman | |
BreakConstructorInitializersBeforeComma: false | |
ConstructorInitializerAllOnOneLineOrOnePerLine: true | |
Cpp11BracedListStyle: true | |
IndentCaseLabels: true | |
MaxEmptyLinesToKeep: 2 | |
PointerBindsToType: false | |
SpacesBeforeTrailingComments: 2 | |
Standard: Cpp11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tutorial here: https://medium.com/@harmittaa/travis-ci-android-example-357f6e632fc4 | |
language: android | |
sudo: required | |
jdk: oraclejdk8 | |
before_cache: | |
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock | |
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ $1 = 0000000000000000000000000000000000000000 ]; then | |
old=4b825dc642cb6eb9a060e54bf8d69288fbee4904 | |
else | |
old=$1 | |
fi | |
if [ -f Podfile ] && command -v pod install >/dev/null && | |
git diff --name-only $old $2 | egrep -q '^Podfile$' | |
then | |
(unset GIT_DIR; exec pod install) | grep -v '^Using ' | grep -v ' is complete' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
THIS_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
cd "${THIS_SCRIPT_DIR}/.." | |
# Check if there's something uncommitted (don't release if there are files | |
# not yet committed) | |
set +e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Option defaults | |
OPT="value" | |
# getopts string | |
# This string needs to be updated with the single character options (e.g. -f) | |
opts="fvo:" | |
# Gets the command name without path | |
cmd(){ echo `basename $0`; } |
OlderNewer