From 31728602549364951e0cb345945862fe8f6a144b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Wr=C3=B3tniak?= Date: Wed, 9 Aug 2017 02:21:29 +0200 Subject: [PATCH 1/3] changelog updated and reformated support version bump to 26.0.0 gradle version bump to 4.1 travis.yml removed --- .travis.yml | 60 ----------------------- CHANGELOG.md | 4 +- README.md | 2 +- android-gif-drawable/build.gradle | 2 +- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.jar | Bin 54712 -> 54708 bytes gradle/wrapper/gradle-wrapper.properties | 3 +- 7 files changed, 6 insertions(+), 67 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bc39afd0..00000000 --- a/.travis.yml +++ /dev/null @@ -1,60 +0,0 @@ -env: - global: - - MALLOC_ARENA_MAX=2 - -sudo: true - -language: - - android - -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - libstdc++-4.9-dev - - oracle-java8-installer - -licenses: - - '*' - -android: - components: - - tools # to get the new `repository-11.xml` - - tools # see https://github.com/travis-ci/travis-ci/issues/6040#issuecomment-219367943) - -jdk: - - oraclejdk8 - -before_install: - - export PATH=${PATH}:${ANDROID_HOME}/tools/bin - - mkdir -p ${ANDROID_HOME}/licenses - - echo 8933bad161af4178b1185d1a37fbf41ea5269c55 > ${ANDROID_HOME}/licenses/android-sdk-license - - sdkmanager "tools" "platform-tools" "build-tools;26.0.0" "platforms;android-24" "platforms;android-26" "ndk-bundle" "extras;android;m2repository" "system-images;android-24;google_apis;armeabi-v7a" - - export ANDROID_NDK_HOME=${ANDROID_HOME}/ndk-bundle - -before_script: - - echo n | ${ANDROID_HOME}/tools/bin/avdmanager create avd --force --name emulator --abi armeabi-v7a --package "system-images;android-24;google_apis;armeabi-v7a" - - pushd ${ANDROID_HOME}/tools - - emulator @emulator -no-window -gpu off -no-audio & - - popd - - android-wait-for-emulator - - adb shell wm dismiss-keyguard - -script: - - ./gradlew build connectedCheck :android-gif-drawable:jacocoTestReport --scan - -after_script: - - cat android-gif-drawable/build/outputs/lint-results-debug.xml - - adb logcat -d - -after_success: - - bash <(curl -s https://codecov.io/bash) - -before_cache: - - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - -cache: - directories: - - $HOME/.gradle/caches/ - - $HOME/.gradle/wrapper/ diff --git a/CHANGELOG.md b/CHANGELOG.md index b997d591..fa6e5126 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,9 @@ - Fixed Loop count interpretation - [#430](https://github.com/koral--/android-gif-drawable/pull/430) - Fixed direct byte buffer input source handling - [#434](https://github.com/koral--/android-gif-drawable/issues/434) - Fixed changing input source in `GifTextureView` - [#429](https://github.com/koral--/android-gif-drawable/issues/429) -- Android Support library updated to 26.0.0 +- Android Support library updated to 26.0.1 - Android gradle plugin updated to 2.3.3 -- Gradle wrapper regenerated with 4.0.1 +- Gradle wrapper regenerated with 4.1 - NDK version updated to r15c - Mockito updated to 2.7.48 - Build tools updated to 26.0.1 diff --git a/README.md b/README.md index 3ef8311a..4456e780 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ android-gif-drawable ==================== [![Maven Central](https://maven-badges.herokuapp.com/maven-central/pl.droidsonroids.gif/android-gif-drawable/badge.svg?style=flat)](https://maven-badges.herokuapp.com/maven-central/pl.droidsonroids.gif/android-gif-drawable) -[![Build Status](https://travis-ci.org/koral--/android-gif-drawable.png?branch=master)](https://travis-ci.org/koral--/android-gif-drawable) +[![Build Status](https://www.bitrise.io/app/78fd40a5596e97e7/status.svg?token=SMUtlPklcIRBODd513ZdiQ&branch=master)](https://www.bitrise.io/app/78fd40a5596e97e7) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-android--gif--drawable-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1147) [![Android-Libs](https://img.shields.io/badge/Android--Libs-android--gif--drawable-orange.svg?style=flat)](http://android-libs.com/lib/android-gif-drawable) [![Android Weekly](http://img.shields.io/badge/Android%20Weekly-%2393-2CB3E5.svg?style=flat)](http://androidweekly.net/issues/issue-93) diff --git a/android-gif-drawable/build.gradle b/android-gif-drawable/build.gradle index 85c646d0..0c867cd4 100644 --- a/android-gif-drawable/build.gradle +++ b/android-gif-drawable/build.gradle @@ -67,7 +67,7 @@ dependencies { provided "com.android.support:support-annotations:$versions.androidSupport" testCompile 'junit:junit:4.12' testCompile 'org.mockito:mockito-core:2.8.47' - testCompile 'org.robolectric:robolectric:3.4' + testCompile 'org.robolectric:robolectric:3.4.2' testCompile 'org.assertj:assertj-core:3.8.0' testCompile 'net.jodah:concurrentunit:0.4.2' testCompile 'org.khronos:opengl-api:gl1.1-android-2.1_r1' diff --git a/build.gradle b/build.gradle index 2343ad51..f8a64d16 100644 --- a/build.gradle +++ b/build.gradle @@ -26,7 +26,7 @@ ext { targetSdk : 26, minSdk : 9, buildTools : '26.0.1', - androidSupport: '26.0.0' + androidSupport: '26.0.1' ] } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 4f5385e5436be6edc40d33ed8e41e058bbc4cbc1..7a3265ee94c0ab25cf079ac8ccdf87f41d455d42 100644 GIT binary patch delta 673 zcmYL{T}YEr9LC@CS2iPM?-E7dDatC-SEkOe=9HWi7A|cvi!7}mR_kk$kr%=)BqA>g zwTIC+k+YNsInN&s|1%lPmm+E8Eh%)}BF_bAu%@Q_3^@dEz<l3g#bM?1)#;Dy%C z*08Rfp_Kwr&n_$#^@k<$_J3tb8p5lYQ&ern_>2i&vk|sgm5ME*;j$Po#HGGU$o4ut zVzaems!Pipl+CHkkB+&cBs+!K)|La8vj8h|Dk*JgD;Jh|m0CK5^vxfpvMzy<`9q9g zTsTe!4=kSDxVNA(A0`(X>6r&_J$qqD%BYVhRPN=n5NEx+gf+&k=v55*itr`UOy_+Z zD@AfLs!*sG-+Ig8NXU4}<)fRpKDZOVqE@=yFHq}OaQd@KrU4Wmd>#aSeGwT?5UXcak+u^JQr9RKSG`{j%M7A*Dx9H<8Jl?#zYtUjVpqWOon)o1DZFX^1&JE}ZvX%Q delta 808 zcmYk4T}YEr7{}l9IOevdZq;EW~wo1-H9(V z3gu^RgwpUNY(P$Ke7-eTz{=bdbn<4Vym+Y16R*h3lcc&NWLBt{jP=N= z&&K_b!fwM8aOe%Ma~&eo*O85z3kJN1$m}PkBaLM0 z7Qi)kiqhQ3cNZhf`PVs_>A>de$oz;0?dY8^B2&MRHT`SnwY$;TARk diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 17c03465..f16d2666 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Tue Jul 18 22:21:18 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.0.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-bin.zip From 9b4b8ae07542cd4a472b80dace83f01a2fda6d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Wr=C3=B3tniak?= Date: Sat, 12 Aug 2017 01:16:17 +0200 Subject: [PATCH 2/3] ui test plugin added --- build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index f8a64d16..398e8478 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,8 @@ buildscript { } plugins { - id 'com.gradle.build-scan' version '1.8' + id "com.gradle.build-scan" version "1.8" + id "pl.droidsonroids.ui.test" version "2.0.0" } buildScan { From b0162db001c346d74377041a988117989365bed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Wr=C3=B3tniak?= Date: Sat, 12 Aug 2017 16:34:38 +0200 Subject: [PATCH 3/3] Input stream reading fixed --- android-gif-drawable/build.gradle | 4 ++++ android-gif-drawable/src/main/c/gif.c | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/android-gif-drawable/build.gradle b/android-gif-drawable/build.gradle index 0c867cd4..1a69d688 100644 --- a/android-gif-drawable/build.gradle +++ b/android-gif-drawable/build.gradle @@ -56,6 +56,10 @@ android { buildTypes { release { signingConfig signingConfigs.release + if (isDebugBuild()) { + debuggable true + jniDebuggable true + } } } testOptions { diff --git a/android-gif-drawable/src/main/c/gif.c b/android-gif-drawable/src/main/c/gif.c index 84a5984b..60bf02cf 100644 --- a/android-gif-drawable/src/main/c/gif.c +++ b/android-gif-drawable/src/main/c/gif.c @@ -38,6 +38,9 @@ static jint bufferUpTo(JNIEnv *env, StreamContainer *sc, size_t size) { totalLength += length; } else { if ((*env)->ExceptionCheck(env)) { +#ifdef DEBUG + (*env)->ExceptionDescribe(env); +#endif (*env)->ExceptionClear(env); } break; @@ -106,6 +109,9 @@ int streamRewind(GifInfo *info) { } (*env)->CallVoidMethod(env, sc->stream, sc->resetMethodID); if ((*env)->ExceptionCheck(env)) { +#ifdef DEBUG + (*env)->ExceptionDescribe(env); +#endif (*env)->ExceptionClear(env); info->gifFilePtr->Error = D_GIF_ERR_REWIND_FAILED; return -1; @@ -273,7 +279,7 @@ Java_pl_droidsonroids_gif_GifInfoHandle_openStream(JNIEnv *env, jclass __unused container->markCalled = false; descriptor.GifFileIn = DGifOpen(container, &streamRead, &descriptor.Error); - (*env)->CallVoidMethod(env, stream, markMethodID, LONG_MAX); + (*env)->CallVoidMethod(env, stream, markMethodID, INT32_MAX); if (!(*env)->ExceptionCheck(env)) { GifInfo *info = createGifInfo(&descriptor, env); @@ -281,6 +287,9 @@ Java_pl_droidsonroids_gif_GifInfoHandle_openStream(JNIEnv *env, jclass __unused container->bufferPosition = 0; return (jlong) (intptr_t) info; } else { +#ifdef DEBUG + (*env)->ExceptionDescribe(env); +#endif (*env)->DeleteGlobalRef(env, container->stream); (*env)->DeleteGlobalRef(env, container->buffer); free(container);