-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
46 lines (45 loc) · 1.49 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
language: java
sudo: false
install: mvn -Ptravis -DskipTests=true -nsu -B install
script:
- mvn -Ptravis ${JACOCO} -nsu -B test
- find $HOME/.m2/repository/com/google/zxing -path "*SNAPSHOT/*" -delete
- find $HOME/.m2/repository/com/google/zxing -name "*SNAPSHOT" -type d -delete
matrix:
include:
- jdk: openjdk8
env:
- JACOCO=-Pjacoco
- ANDROID_HOME=$HOME/android-sdk-linux
before_install: if [ ! -d $HOME/android-sdk-linux/platforms ]; then curl -s https://storage.googleapis.com/zxing-build/android-sdk-linux.tar.bz2 | bunzip2 | tar xf - -C $HOME; else ls -l $HOME/android-sdk-linux; fi
- jdk: oraclejdk11
cache:
directories:
- $HOME/.m2
- $HOME/android-sdk-linux
git:
depth: 10
after_success: if [ -n "$JACOCO" ]; then bash <(curl -s https://codecov.io/bash); fi
# The Android SDK package android-sdk-linux.tar.bz2 above is built roughly like so:
#
# Download Command Line tools for Linux from https://developer.android.com/studio#downloads
#
# mkdir android-sdk-linux; cd android-sdk-linux
# mv /path/to/sdk-tools-linux-4333796.zip .
# unzip *.zip; rm *.zip
#
# # Or different, more recent versions; see sdkmanager --list
# ./tools/bin/sdkmanager "platforms;android-22" "build-tools;28.0.2"
# # Accept license
#
# ./tools/bin/sdkmanager --update
# # Accept license
#
# cp tools/source.properties ..
#
# ./tools/bin/sdkmanager --uninstall tools
#
# mkdir tools; mv ../source.properties tools
#
# cd ..
# tar cf - android-sdk-linux | bzip2 -9 > android-sdk-linux.tar.bz2