diff --git a/.travis.yml b/.travis.yml index b4d7c2411..45a21030e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,8 @@ language: android env: global: - - BUILD_API=29 - - BUILD_TOOLS=29.0.3 + - BUILD_API=30 + - BUILD_TOOLS=30.0.3 - ABI=x86 - EMU_API=22 - EMU_FLAVOR=default @@ -24,8 +24,7 @@ licenses: before_install: - sudo wget "https://bouncycastle.org/download/bcprov-ext-jdk15on-165.jar" -O "${JAVA_HOME}/jre/lib/ext/bcprov-ext-jdk15on-165.jar" - sudo echo "security.provider.11=org.bouncycastle.jce.provider.BouncyCastleProvider" | sudo tee -a ${JAVA_HOME}/jre/lib/security/java.security -# Shapshot tests and emulator are commented -# - python -m pip install Pillow --user # library for image manipulation in snapshot tests + - python -m pip install Tools/Pillow-6.2.2-cp27-cp27mu-manylinux1_x86_64.whl --user # library for image manipulation in snapshot tests before_script: # Install Android SDK and run emulator @@ -37,16 +36,16 @@ before_script: - echo y | sdkmanager "platforms;android-$BUILD_API" >/dev/null - echo y | sdkmanager "extras;android;m2repository" >/dev/null - echo y | sdkmanager "system-images;android-$EMU_API;$EMU_FLAVOR;$ABI" -# - echo no | avdmanager create avd --force -n test -k "system-images;android-$EMU_API;$EMU_FLAVOR;$ABI" -c 100M -# - emulator -verbose -avd test -no-accel -no-snapshot -no-window -no-audio -camera-back none -camera-front none -selinux permissive -qemu -m 2048 & + - echo no | avdmanager create avd --force -n test -k "system-images;android-$EMU_API;$EMU_FLAVOR;$ABI" -c 100M + - emulator -verbose -avd test -no-accel -no-snapshot -no-window -no-audio -camera-back none -camera-front none -selinux permissive -qemu -m 2048 & script: - ./gradlew assembleRelease testReleaseUnitTest # wait emulator to come alive and start snapshot tests -# - android-wait-for-emulator -# - adb shell input keyevent 82 & -# - ./gradlew verifyDebugAndroidTestScreenshotTest + - android-wait-for-emulator + - adb shell input keyevent 82 & + - ./gradlew verifyDebugAndroidTestScreenshotTest before_deploy: - ./Tools/verifyTag.sh diff --git a/AndroidSDKTests/build.gradle b/AndroidSDKTests/build.gradle index c03cdd97d..18cd390ee 100644 --- a/AndroidSDKTests/build.gradle +++ b/AndroidSDKTests/build.gradle @@ -7,7 +7,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.facebook.testing.screenshot:plugin:0.12.0' + classpath 'com.facebook.testing.screenshot:plugin:0.14.0' } } @@ -45,12 +45,6 @@ android { logger.lifecycle("Running test: " + descriptor) } - // MiPush jar is causing java.lang.VerifyError in Robolectric. Possible cause is that - // the library was proguarded like app instead of library. - // Check https://github.com/robolectric/robolectric/issues/2750 for details. - // To fix tests in Android Studio add "-noverify" jvm option to JUnit run configuration template. - jvmArgs '-noverify' - } unitTests { includeAndroidResources = true @@ -67,7 +61,7 @@ dependencies { implementation project(':AndroidSDKPush') implementation project(':AndroidSDKLocation') implementation project(':AndroidSDKFcm') - implementation project(':AndroidSDKMiPush') + testImplementation project(':AndroidSDKMiPush') // add dep for unit tests only, fails otherwise implementation "androidx.appcompat:appcompat:${APPCOMPAT_LIBRARY_VERSION}" implementation 'com.google.android.gms:play-services-location:17.0.0' @@ -93,7 +87,7 @@ dependencies { androidTestImplementation "com.crittercism.dexmaker:dexmaker:1.4" androidTestImplementation "com.crittercism.dexmaker:dexmaker-mockito:1.4" androidTestImplementation "com.crittercism.dexmaker:dexmaker-dx:1.4" - implementation 'com.facebook.testing.screenshot:core:0.12.0' + implementation 'com.facebook.testing.screenshot:core:0.14.0' } task jarTests(type: Jar, dependsOn: "assembleDebugUnitTest") { diff --git a/Tools/Pillow-6.2.2-cp27-cp27mu-manylinux1_x86_64.whl b/Tools/Pillow-6.2.2-cp27-cp27mu-manylinux1_x86_64.whl new file mode 100644 index 000000000..11ebab087 Binary files /dev/null and b/Tools/Pillow-6.2.2-cp27-cp27mu-manylinux1_x86_64.whl differ