diff --git a/.travis.yml b/.travis.yml index 5d5dfd191..350fe4c7d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ language: android +# you MUST mention trusty https://docs.travis-ci.com/user/languages/android/ +dist: trusty env: global: # These parameters should match the parameters for build tools and sdk versions in the gradle file @@ -41,7 +43,7 @@ before_script: - echo $TRAVIS_TAG - echo no | android create avd --force -n test -t android-$EMULATOR_API --abi armeabi-v7a - emulator -avd test -no-audio -no-window & - - android-wait-for-emulator + - scripts/android-wait-for-emulator.sh - adb shell input keyevent 82 & addons: srcclr: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cdf421aa..fb8de30d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Optimizely Android X SDK Changelog +## 3.1.1 +July 23rd, 2019 + +### Bug Fixes: +* SourceClear flagged jackson-databind 2.9.8 fixed in 2.9.9.1 + ## 3.1.0 May 13th, 2019 diff --git a/android-sdk/build.gradle b/android-sdk/build.gradle index 23d810ce5..b10e27b56 100644 --- a/android-sdk/build.gradle +++ b/android-sdk/build.gradle @@ -83,7 +83,7 @@ dependencies { androidTestImplementation "com.google.dexmaker:dexmaker-mockito:$dexmaker_ver" androidTestImplementation "com.noveogroup.android:android-logger:$android_logger_ver" androidTestImplementation "com.google.code.gson:gson:$gson_ver" - androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:2.9.8" + androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:$jacksonversion" } uploadArchives { diff --git a/build.gradle b/build.gradle index 6e8efe725..677a97d0b 100644 --- a/build.gradle +++ b/build.gradle @@ -55,7 +55,7 @@ ext { target_sdk_version = 28 java_core_ver = "3.1.0" android_logger_ver = "1.3.6" - jacksonversion= "2.9.8" + jacksonversion= "2.9.9.1" support_annotations_ver = "24.2.1" junit_ver = "4.12" mockito_ver = "1.9.5" diff --git a/datafile-handler/build.gradle b/datafile-handler/build.gradle index a888efaac..dc1a6d857 100644 --- a/datafile-handler/build.gradle +++ b/datafile-handler/build.gradle @@ -70,7 +70,7 @@ dependencies { androidTestImplementation "com.google.dexmaker:dexmaker:$dexmaker_ver" androidTestImplementation "com.google.dexmaker:dexmaker-mockito:$dexmaker_ver" androidTestImplementation "com.noveogroup.android:android-logger:$android_logger_ver" - androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:2.9.8" + androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:$jacksonversion" } uploadArchives { diff --git a/event-handler/build.gradle b/event-handler/build.gradle index 88b2b86eb..a695959cb 100644 --- a/event-handler/build.gradle +++ b/event-handler/build.gradle @@ -71,7 +71,7 @@ dependencies { androidTestImplementation "com.google.dexmaker:dexmaker:$dexmaker_ver" androidTestImplementation "com.google.dexmaker:dexmaker-mockito:$dexmaker_ver" androidTestImplementation "com.noveogroup.android:android-logger:$android_logger_ver" - androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:2.9.8" + androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:$jacksonversion" } uploadArchives { diff --git a/scripts/android-wait-for-emulator.sh b/scripts/android-wait-for-emulator.sh new file mode 100755 index 000000000..49c1abfb6 --- /dev/null +++ b/scripts/android-wait-for-emulator.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Originally written by Ralf Kistner , but placed in the public domain + +set +e + +bootanim="" +failcounter=0 +#timeout_in_sec=360 # 6 minutes +timeout_in_sec=900 # 15 minutes +echo "Waiting for emulator to start" +until [[ "$bootanim" =~ "stopped" ]]; do + bootanim=`adb -e shell getprop init.svc.bootanim 2>&1 &` +#echo bootanim=\`$bootanim\` + if [[ "$bootanim" =~ "device not found" || "$bootanim" =~ "device offline" + || "$bootanim" =~ "running" || "$bootanim" =~ "error: no emulators found" ]]; then + let "failcounter += 5" + echo -n "." + if [[ $failcounter -gt timeout_in_sec ]]; then + echo "Timeout ($timeout_in_sec seconds) reached; failed to start emulator" + exit 1 + fi + else + echo "unexpected behavior from (adb -e shell getprop init.svc.bootanim):" + echo "$bootanim" + fi + sleep 5 +done + +echo "Emulator is ready (took $failcounter seconds)" diff --git a/shared/build.gradle b/shared/build.gradle index b006ab253..f0c45caec 100644 --- a/shared/build.gradle +++ b/shared/build.gradle @@ -74,7 +74,7 @@ dependencies { androidTestImplementation "com.google.dexmaker:dexmaker:$dexmaker_ver" androidTestImplementation "com.google.dexmaker:dexmaker-mockito:$dexmaker_ver" androidTestImplementation "com.noveogroup.android:android-logger:$android_logger_ver" - androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:2.9.8" + androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:$jacksonversion" } uploadArchives { diff --git a/test-app/build.gradle b/test-app/build.gradle index 06321fb22..a51de3bda 100644 --- a/test-app/build.gradle +++ b/test-app/build.gradle @@ -48,7 +48,7 @@ dependencies { // https://mvnrepository.com/artifact/org.slf4j/slf4j-android implementation group: 'org.slf4j', name: 'slf4j-android', version: '1.7.25' // EXAMPLE REPLACE gson json parsing with jackson-databind json parsing. - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8' + implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "$jacksonversion" testImplementation "junit:junit:$junit_ver" testImplementation "org.mockito:mockito-core:$mockito_ver" @@ -68,5 +68,5 @@ dependencies { // androidTestImplementation 'com.optimizely.ab:android-sdk:1.0.0' androidTestImplementation project(':android-sdk') androidTestImplementation project(path: ':shared') - androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:2.9.8" + androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:$jacksonversion" } diff --git a/user-profile/build.gradle b/user-profile/build.gradle index 8a5f74adf..7aa2f086e 100644 --- a/user-profile/build.gradle +++ b/user-profile/build.gradle @@ -70,7 +70,7 @@ dependencies { androidTestImplementation "com.google.dexmaker:dexmaker:$dexmaker_ver" androidTestImplementation "com.google.dexmaker:dexmaker-mockito:$dexmaker_ver" androidTestImplementation "com.noveogroup.android:android-logger:$android_logger_ver" - androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:2.9.8" + androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:$jacksonversion" } uploadArchives {