From 5d61990e26f474ab06e6efa7412436c9a9d548bb Mon Sep 17 00:00:00 2001 From: Sean Owen Date: Tue, 24 Jan 2017 13:25:08 +0000 Subject: [PATCH] Build entirely using local Android SDK to move beyond Android 4.1 --- .travis.yml | 23 +++++++++++++++++++++-- pom.xml | 26 ++++++++++++++++---------- 2 files changed, 37 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4a3dd9322..fb1c417ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,11 +13,30 @@ matrix: # Covers Java 8, Oracle JDK, Android apps - jdk: oraclejdk8 env: ANDROID_HOME=$HOME/android-sdk-linux - before_install: if [ ! -d $HOME/android-sdk-linux/tools ]; 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 + 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 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 \ No newline at end of file +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: +# +# mkdir android-sdk-linux; cd android-sdk-linux +# curl -O https://dl.google.com/android/repository/tools_r25.2.3-linux.zip +# unzip *.zip +# rm *.zip +# +# # Or different, more recent versions: +# ./tools/bin/sdkmanager "platforms;android-22" "build-tools;25.0.2" +# # Accept license +# +# ./tools/bin/sdkmanager --uninstall tools +# +# ./tools/bin/sdkmanager --update +# # Accept license +# +# cd .. +# tar cf - android-sdk-linux | bzip2 -9 > android-sdk-linux.tar.bz2 diff --git a/pom.xml b/pom.xml index 05f79520b..38aeaaa1b 100644 --- a/pom.xml +++ b/pom.xml @@ -46,12 +46,6 @@ guava 21.0 - - com.google.android - android - 4.1.1.4 - provided - com.google.zxing core @@ -84,8 +78,7 @@ core javase - android-core - android-integration + zxing.appspot.com zxingorg @@ -100,6 +93,7 @@ 1.7.22 3.3.1-SNAPSHOT + 22 @@ -176,7 +170,6 @@ ${java.version} -Xlint:all - -Werror @@ -362,7 +355,7 @@ - 24 + ${android.platform} true @@ -716,10 +709,23 @@ + android-core + android-integration android androidtest glass + + + + com.google.android + android + ${android.platform} + system + ${env.ANDROID_HOME}/platforms/android-${android.platform}/android.jar + + + release