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..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 { @@ -67,7 +71,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/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); diff --git a/build.gradle b/build.gradle index 2343ad51..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 { @@ -26,7 +27,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 4f5385e5..7a3265ee 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ 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