Skip to content

Commit 71078a0

Browse files
committed
Merge pull request google#5 from tjohns/travis
Add support for building with Travis
2 parents 54dbfaf + c4d7583 commit 71078a0

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

.travis.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
language: android
2+
3+
android:
4+
components:
5+
- build-tools-19.0.0
6+
7+
notifications:
8+
email: false
9+
10+
env:
11+
matrix:
12+
- ANDROID_SDKS=android-19,sysimg-19 ANDROID_TARGET=android-19 ANDROID_ABI=armeabi-v7a
13+
14+
before_install:
15+
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
16+
- emulator -avd test -no-skin -no-audio -no-window &
17+
18+
before_script:
19+
- ./scripts/wait_for_emulator.sh
20+
- adb shell input keyevent 82 &

android/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,8 @@ android {
4444
minSdkVersion 10
4545
targetSdkVersion 19
4646
}
47+
48+
lintOptions {
49+
abortOnError false
50+
}
4751
}

scripts/wait_for_emulator.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
bootanim=""
4+
failcounter=0
5+
until [[ "$bootanim" =~ "stopped" ]]; do
6+
bootanim=`adb -e shell getprop init.svc.bootanim 2>&1`
7+
echo "$bootanim"
8+
if [[ "$bootanim" =~ "not found" ]]; then
9+
let "failcounter += 1"
10+
if [[ $failcounter -gt 3 ]]; then
11+
echo "Failed to start emulator"
12+
exit 1
13+
fi
14+
fi
15+
sleep 1
16+
done
17+
echo "Done"

0 commit comments

Comments
 (0)