From bc9addd4a4cd9d9f21c155bbf5727c4fac113323 Mon Sep 17 00:00:00 2001 From: fractalwrench Date: Tue, 12 Jun 2018 13:36:33 +0100 Subject: [PATCH 1/5] build: remove deprecated armeabi abi which was removed in ndk r17, and prefer google before jcenter --- example/build.gradle | 4 ++-- ndk/build.gradle | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/example/build.gradle b/example/build.gradle index 8bb4c94..80798f5 100644 --- a/example/build.gradle +++ b/example/build.gradle @@ -1,8 +1,8 @@ apply plugin: 'com.android.application' repositories { - jcenter() google() + jcenter() } allprojects { @@ -66,7 +66,7 @@ android { } arm { ndk { - abiFilters "armeabi-v7a", "armeabi" + abiFilters "armeabi-v7a" } } } diff --git a/ndk/build.gradle b/ndk/build.gradle index 0746dcd..f9cc98a 100644 --- a/ndk/build.gradle +++ b/ndk/build.gradle @@ -1,8 +1,12 @@ apply plugin: 'com.android.library' repositories { - jcenter() google() + jcenter() + + flatDir { + dirs 'libs' + } } android { @@ -13,7 +17,7 @@ android { // Note minSdkVersion must be >=21 for 64 bit architectures minSdkVersion Integer.parseInt(project.ANDROID_MIN_SDK_VERSION) ndk { - abiFilters 'arm64-v8a', 'armeabi-v7a', 'armeabi', 'x86', 'x86_64' + abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64' } } From 8911464439bbdcb9e8dca8e9997587e9fc18b9ee Mon Sep 17 00:00:00 2001 From: fractalwrench Date: Tue, 12 Jun 2018 13:47:28 +0100 Subject: [PATCH 2/5] refactor: update breadcrumbs jni call to reflect new class location --- ndk/src/main/jni/bugsnag_ndk_report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndk/src/main/jni/bugsnag_ndk_report.c b/ndk/src/main/jni/bugsnag_ndk_report.c index 0ab9956..f27c62d 100644 --- a/ndk/src/main/jni/bugsnag_ndk_report.c +++ b/ndk/src/main/jni/bugsnag_ndk_report.c @@ -782,7 +782,7 @@ void bsg_populate_breadcrumbs(JNIEnv *env, bsg_event *event) { jmethodID get_breadcrumbs_method = (*env)->GetStaticMethodID(env, interface_class, "getBreadcrumbs", "()[Ljava/lang/Object;"); jarray breadcrumbs_value = (*env)->CallStaticObjectMethod(env, interface_class, get_breadcrumbs_method); - jclass breadcrumb_class = (*env)->FindClass(env, "com/bugsnag/android/Breadcrumbs$Breadcrumb"); + jclass breadcrumb_class = (*env)->FindClass(env, "com/bugsnag/android/Breadcrumb"); jfieldID timestamp_field = (*env)->GetFieldID(env, breadcrumb_class, "timestamp", "Ljava/lang/String;"); jfieldID name_field = (*env)->GetFieldID(env, breadcrumb_class, "name", "Ljava/lang/String;"); jfieldID type_field = (*env)->GetFieldID(env, breadcrumb_class, "type", "Lcom/bugsnag/android/BreadcrumbType;"); From 684c951078823741fbebc5c63532f4cb6d2911d9 Mon Sep 17 00:00:00 2001 From: Jamie Lynch Date: Fri, 15 Jun 2018 16:31:50 +0100 Subject: [PATCH 3/5] build: Build project with older version of ndk (#20) ## Goal Builds the project with NDK r16b, which maintains armeabi support - a requirement for users stuck on older versions. This requires a script that downloads the NDK bundle onto the machine. This change also caches gradle to speed up the CI build. ## Changeset ### Added - Gradle caching - NDK download bash script --- .travis.yml | 16 ++++++++++++---- install_ndk.sh | 19 +++++++++++++++++++ ndk/build.gradle | 2 +- 3 files changed, 32 insertions(+), 5 deletions(-) create mode 100755 install_ndk.sh diff --git a/.travis.yml b/.travis.yml index 2cf842d..2da7f1a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,14 +14,22 @@ android: - extra-google-m2repository - extra-android-m2repository +before_cache: + - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock + - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ +cache: + directories: + - $HOME/.gradle/caches/ + - $HOME/.gradle/wrapper/ + - $HOME/.android/build-cache + before_install: -# see https://github.com/travis-ci/travis-ci/issues/8874 + - ./install_ndk.sh + # see https://github.com/travis-ci/travis-ci/issues/8874 - yes | sdkmanager "platforms;android-27" - echo y | sdkmanager "cmake;3.6.4111459" - - echo y | sdkmanager "ndk-bundle" - echo y | sdkmanager "lldb;3.1" - env: matrix: - ANDROID_TARGET=android-19 ANDROID_ABI=armeabi-v7a @@ -29,4 +37,4 @@ env: script: ./gradlew checkstyle clean build -sudo: true +sudo: true \ No newline at end of file diff --git a/install_ndk.sh b/install_ndk.sh new file mode 100755 index 0000000..5fd1e31 --- /dev/null +++ b/install_ndk.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +export OS_VERSION='linux-x86_64' +export NDK_VERSION='r16b' + +echo "Downloading NDK, this will take a while..." +wget -q https://dl.google.com/android/repository/android-ndk-${NDK_VERSION}-${OS_VERSION}.zip + +echo "Unzipping NDK, this will take a while..." +unzip -q android-ndk-${NDK_VERSION}-${OS_VERSION}.zip + +echo "Copying to ndk-bundle" +mv android-ndk-${NDK_VERSION} $ANDROID_HOME/ndk-bundle + +export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle +export ANDROID_NDK=$ANDROID_HOME/ndk-bundle + +# add to PATH +export PATH=${PATH}:${ANDROID_NDK_HOME} \ No newline at end of file diff --git a/ndk/build.gradle b/ndk/build.gradle index f9cc98a..8ca690e 100644 --- a/ndk/build.gradle +++ b/ndk/build.gradle @@ -17,7 +17,7 @@ android { // Note minSdkVersion must be >=21 for 64 bit architectures minSdkVersion Integer.parseInt(project.ANDROID_MIN_SDK_VERSION) ndk { - abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64' + abiFilters 'arm64-v8a', 'armeabi-v7a', 'armeabi', 'x86', 'x86_64' } } From 6b8f1577de870708050275f9a671932233d71fb5 Mon Sep 17 00:00:00 2001 From: fractalwrench Date: Mon, 18 Jun 2018 10:16:42 +0100 Subject: [PATCH 4/5] docs: increment version, document session tracking on-by-default change --- CHANGELOG.md | 13 +++++++++++++ gradle.properties | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index def31d2..3c67e04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +## 1.2.0 (2018-04-16) + +**IMPORTANT NOTE**: this release alters the behaviour of the notifier to track sessions automatically. + A session will be automatically captured on each app launch and sent to [https://sessions.bugsnag.com](https://sessions.bugsnag.com). If you + use Bugsnag On-Premise, it is now also recommended that you set your notify and session endpoints + via `config.setEndpoints(String notify, String sessions)`. + +* Update bugsnag-android dependency version to v4.5.0: + + * Enable automatic session tracking by default [#314](https://github.com/bugsnag/bugsnag-android/pull/314) + + * Build bugsnag-android-ndk project with r16b [#20](https://github.com/bugsnag/bugsnag-android-ndk/pull/20) + ## 1.1.3 (2018-04-16) ### Bug fixes diff --git a/gradle.properties b/gradle.properties index 364db07..2d94297 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=1.1.3 +VERSION_NAME=1.2.0 GROUP=com.bugsnag BUGSNAG_ANDROID_ARTIFACT_ID=bugsnag-android @@ -22,4 +22,4 @@ ANDROID_BUILD_TOOLS_VERSION=27.0.0 ANDROID_COMPILE_SDK_VERSION=27 ANDROID_TARGET_SDK_VERSION=27 ANDROID_MIN_SDK_VERSION=14 -BUGSNAG_ANDROID_VERSION=4.3.1 +BUGSNAG_ANDROID_VERSION=4.5.0 From eebf817066b464c7a457abc6b99584a7e383243e Mon Sep 17 00:00:00 2001 From: Jamie Lynch Date: Mon, 18 Jun 2018 10:31:44 +0100 Subject: [PATCH 5/5] update changelog date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c67e04..bd51f9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.2.0 (2018-04-16) +## 1.2.0 (2018-06-18) **IMPORTANT NOTE**: this release alters the behaviour of the notifier to track sessions automatically. A session will be automatically captured on each app launch and sent to [https://sessions.bugsnag.com](https://sessions.bugsnag.com). If you