From 12e53bf5b066409df4f50ac6017a58d346c4455f Mon Sep 17 00:00:00 2001 From: fractalwrench Date: Mon, 29 Nov 2021 14:55:55 +0000 Subject: [PATCH 1/8] dep: bump compileSdkVersion to 31 --- CHANGELOG.md | 9 ++++++++- bugsnag-benchmarks/build.gradle | 2 +- .../src/main/kotlin/com/bugsnag/android/Versions.kt | 2 +- dockerfiles/Dockerfile.android-common | 2 +- examples/sdk-app-example/app/build.gradle | 4 ++-- .../sdk-app-example/app/src/main/AndroidManifest.xml | 3 ++- features/fixtures/mazerunner/app/build.gradle | 6 +++--- .../mazerunner/app/src/main/AndroidManifest.xml | 10 ++++++++-- .../com/bugsnag/android/mazerunner/MainActivity.kt | 7 +++++-- .../mazerunner/cxx-scenarios-bugsnag/build.gradle | 2 +- .../fixtures/mazerunner/cxx-scenarios/build.gradle | 2 +- .../fixtures/mazerunner/jvm-scenarios/build.gradle | 2 +- features/fixtures/minimalapp/app/build.gradle | 4 ++-- 13 files changed, 36 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a91d27c8e2..cf896ea6c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,15 @@ # Changelog +## TBD + +### Enhancements + +* Bump compileSdkVersion to apiLevel 31 + [#1536](https://github.com/bugsnag/bugsnag-android/pull/1536) + ## 5.16.0 (2021-11-29) -## Bug fixes +### Bug fixes * Increase resilience of NDK stackframe method capture [#1484](https://github.com/bugsnag/bugsnag-android/pull/1484) diff --git a/bugsnag-benchmarks/build.gradle b/bugsnag-benchmarks/build.gradle index bc1c73ec2a..3c7a3b956c 100644 --- a/bugsnag-benchmarks/build.gradle +++ b/bugsnag-benchmarks/build.gradle @@ -5,7 +5,7 @@ plugins { } android { - compileSdkVersion 30 + compileSdkVersion 31 buildToolsVersion "30.0.3" compileOptions { diff --git a/buildSrc/src/main/kotlin/com/bugsnag/android/Versions.kt b/buildSrc/src/main/kotlin/com/bugsnag/android/Versions.kt index 274a773336..0488f8f48b 100644 --- a/buildSrc/src/main/kotlin/com/bugsnag/android/Versions.kt +++ b/buildSrc/src/main/kotlin/com/bugsnag/android/Versions.kt @@ -8,7 +8,7 @@ import org.gradle.api.JavaVersion object Versions { // Note minSdkVersion must be >=21 for 64 bit architectures val minSdkVersion = 14 - val compileSdkVersion = 30 + val compileSdkVersion = 31 val ndk = "17.2.4988734" val java = JavaVersion.VERSION_1_7 val kotlin = "1.3.72" diff --git a/dockerfiles/Dockerfile.android-common b/dockerfiles/Dockerfile.android-common index a306c81e96..8352ec64a9 100644 --- a/dockerfiles/Dockerfile.android-common +++ b/dockerfiles/Dockerfile.android-common @@ -27,7 +27,7 @@ RUN rm $CMDLINE_TOOLS_NAME # Install Android tools using sdkmanager RUN yes | sdkmanager "platform-tools" > /dev/null -RUN yes | sdkmanager "platforms;android-30" > /dev/null +RUN yes | sdkmanager "platforms;android-31" > /dev/null RUN yes | sdkmanager "ndk;17.2.4988734" > /dev/null RUN yes | sdkmanager "cmake;3.6.4111459" > /dev/null RUN yes | sdkmanager "cmake;3.10.2.4988404" > /dev/null diff --git a/examples/sdk-app-example/app/build.gradle b/examples/sdk-app-example/app/build.gradle index 3baeb10330..c910a5523b 100644 --- a/examples/sdk-app-example/app/build.gradle +++ b/examples/sdk-app-example/app/build.gradle @@ -2,13 +2,13 @@ apply plugin: "com.android.application" apply plugin: "kotlin-android" android { - compileSdkVersion 30 + compileSdkVersion 31 ndkVersion "17.2.4988734" defaultConfig { applicationId "com.example.bugsnag.android" minSdkVersion 14 - targetSdkVersion 30 + targetSdkVersion 31 versionCode 1 versionName "1.0" } diff --git a/examples/sdk-app-example/app/src/main/AndroidManifest.xml b/examples/sdk-app-example/app/src/main/AndroidManifest.xml index 06c094be6a..9e3bd6979b 100644 --- a/examples/sdk-app-example/app/src/main/AndroidManifest.xml +++ b/examples/sdk-app-example/app/src/main/AndroidManifest.xml @@ -18,7 +18,8 @@ + android:label="@string/app_name" + android:exported="true"> diff --git a/features/fixtures/mazerunner/app/build.gradle b/features/fixtures/mazerunner/app/build.gradle index 6518fb6a64..0c017ec2e1 100644 --- a/features/fixtures/mazerunner/app/build.gradle +++ b/features/fixtures/mazerunner/app/build.gradle @@ -4,11 +4,11 @@ apply plugin: "io.gitlab.arturbosch.detekt" apply plugin: "org.jlleitschuh.gradle.ktlint" android { - compileSdkVersion 30 + compileSdkVersion 31 defaultConfig { minSdkVersion 14 - targetSdkVersion 30 + targetSdkVersion 31 versionCode 34 versionName "1.1.14" manifestPlaceholders = [ @@ -55,7 +55,7 @@ android { pickFirst "**/*.so" } lintOptions { - tasks.lint.enabled = false + abortOnError false } if (project.hasProperty("TEST_FIXTURE_NDK_VERSION")) { diff --git a/features/fixtures/mazerunner/app/src/main/AndroidManifest.xml b/features/fixtures/mazerunner/app/src/main/AndroidManifest.xml index e4863cdaa8..d706541504 100644 --- a/features/fixtures/mazerunner/app/src/main/AndroidManifest.xml +++ b/features/fixtures/mazerunner/app/src/main/AndroidManifest.xml @@ -10,14 +10,20 @@ android:gwpAsanMode="always" android:name=".MazerunnerApp" > - + - + diff --git a/features/fixtures/mazerunner/app/src/main/java/com/bugsnag/android/mazerunner/MainActivity.kt b/features/fixtures/mazerunner/app/src/main/java/com/bugsnag/android/mazerunner/MainActivity.kt index 970cfed960..7bdf76f962 100644 --- a/features/fixtures/mazerunner/app/src/main/java/com/bugsnag/android/mazerunner/MainActivity.kt +++ b/features/fixtures/mazerunner/app/src/main/java/com/bugsnag/android/mazerunner/MainActivity.kt @@ -4,6 +4,7 @@ import android.app.Activity import android.content.Context import android.content.Intent import android.content.SharedPreferences +import android.os.Build import android.os.Bundle import android.widget.Button import android.widget.EditText @@ -24,8 +25,10 @@ class MainActivity : Activity() { prefs = getPreferences(Context.MODE_PRIVATE) // Attempt to dismiss any system dialogs (such as "MazeRunner crashed") - val closeDialog = Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS) - sendBroadcast(closeDialog) + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) { + val closeDialog = Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS) + sendBroadcast(closeDialog) + } // load the scenario first, which initialises bugsnag without running any crashy code findViewById