From 959d4e055c8a7391c5cbb5895f28ac895bb75ab9 Mon Sep 17 00:00:00 2001 From: Bartosz Litwiniuk <> Date: Tue, 11 Aug 2026 22:45:55 +0200 Subject: [PATCH 1/4] Upgrade Android to use API 37 --- backtrace-library/build.gradle | 20 ++++++++++---------- example-app/build.gradle | 6 +++--- gson/build.gradle | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/backtrace-library/build.gradle b/backtrace-library/build.gradle index b41c2ea16..d6e20ffd9 100644 --- a/backtrace-library/build.gradle +++ b/backtrace-library/build.gradle @@ -14,10 +14,10 @@ def libVersion = androidGitVersion.name() android { namespace = "backtraceio.library" - compileSdk = 36 + compileSdk = 37 defaultConfig { minSdk = 21 - ndkVersion = '27.3.13750724' + ndkVersion = '29.0.14206865' buildConfigField("String", "VERSION_NAME", "\"${versionName}\"") testInstrumentationRunner = 'androidx.test.runner.AndroidJUnitRunner' @@ -41,7 +41,7 @@ android { buildTypes { release { minifyEnabled = false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } debug { enableUnitTestCoverage = true @@ -50,7 +50,7 @@ android { } testCoverage { - jacocoVersion = "0.8.13" + jacocoVersion = "0.8.15" } externalNativeBuild { @@ -66,10 +66,10 @@ android { } lint { abortOnError = false - targetSdk = 36 + targetSdk = 37 } testOptions { - targetSdk = 36 + targetSdk = 37 } } @@ -124,17 +124,17 @@ def shadedGsonJar = project(":gson").provider { dependencies { implementation 'com.squareup:tape:1.2.3' - implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.annotation:annotation:1.10.0' implementation(files(shadedGsonJar)) testImplementation 'junit:junit:4.13.2' - testImplementation "org.mockito:mockito-core:5.19.0" + testImplementation "org.mockito:mockito-core:5.23.0" testImplementation 'org.json:json:20250517' - testImplementation "com.google.guava:guava:33.4.8-jre" + testImplementation "com.google.guava:guava:33.6.0-jre" androidTestImplementation 'net.jodah:concurrentunit:0.4.6' androidTestImplementation 'androidx.test:rules:1.7.0' androidTestImplementation 'androidx.test.ext:junit:1.3.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0' - androidTestImplementation "org.mockito:mockito-android:5.19.0" + androidTestImplementation "org.mockito:mockito-android:5.23.0" } afterEvaluate { diff --git a/example-app/build.gradle b/example-app/build.gradle index ebbe508f8..035ca4677 100644 --- a/example-app/build.gradle +++ b/example-app/build.gradle @@ -2,11 +2,11 @@ apply plugin: 'com.android.application' android { namespace = "backtraceio.backtraceio" - compileSdk = 36 + compileSdk = 37 defaultConfig { applicationId = "backtraceio.backtraceio" minSdk = 21 - targetSdk = 36 + targetSdk = 37 versionCode = 1 versionName = "1.0" testInstrumentationRunner = 'androidx.test.runner.AndroidJUnitRunner' @@ -60,7 +60,7 @@ String getProperty(String name, String defaultValue) { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.appcompat:appcompat:1.7.1' implementation 'androidx.constraintlayout:constraintlayout:2.2.1' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.3.0' diff --git a/gson/build.gradle b/gson/build.gradle index b70520fb6..1e99dc413 100644 --- a/gson/build.gradle +++ b/gson/build.gradle @@ -1,6 +1,6 @@ plugins { id 'java' - id 'com.github.johnrengelman.shadow' version '8.1.1' + id 'com.gradleup.shadow' version '9.6.1' } repositories { From d1c43280dcadb3dfadc5d786efe5063fdb776e75 Mon Sep 17 00:00:00 2001 From: Bartosz Litwiniuk <> Date: Mon, 17 Aug 2026 19:50:01 +0200 Subject: [PATCH 2/4] Revert NDK upgrade and fix CMake --- backtrace-library/build.gradle | 2 +- backtrace-library/src/main/cpp/CMakeLists.txt | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/backtrace-library/build.gradle b/backtrace-library/build.gradle index 19eb70782..41b12c5b8 100644 --- a/backtrace-library/build.gradle +++ b/backtrace-library/build.gradle @@ -17,7 +17,7 @@ android { compileSdk = 37 defaultConfig { minSdk = 21 - ndkVersion = '29.0.14206865' + ndkVersion = '27.3.13750724' buildConfigField("String", "VERSION_NAME", "\"${versionName}\"") testInstrumentationRunner = 'androidx.test.runner.AndroidJUnitRunner' diff --git a/backtrace-library/src/main/cpp/CMakeLists.txt b/backtrace-library/src/main/cpp/CMakeLists.txt index 192d84d85..9dae10cda 100644 --- a/backtrace-library/src/main/cpp/CMakeLists.txt +++ b/backtrace-library/src/main/cpp/CMakeLists.txt @@ -90,6 +90,13 @@ if (CLIENT_SIDE_UNWINDING) # Bun Libraries set(LIBUNWINDSTACK_ENABLED TRUE) + + # libbun's libunwind backend is unused - client-side-unwinding.cpp only ever + # requests BUN_BACKEND_LIBUNWINDSTACK. Keep it off explicitly: NDK r29+ ships a + # bare LLVM that makes libbun auto-enable a backend which then + # fails to compile (it needs the ptrace nongnu API no NDK provides). + set(LIBUNWIND_ENABLED FALSE) + add_subdirectory(libbun) endif () From 25b44912f88e24352519a6a69baa1178dabfc086 Mon Sep 17 00:00:00 2001 From: Bartosz Litwiniuk <> Date: Mon, 17 Aug 2026 21:22:48 +0200 Subject: [PATCH 3/4] Fix version-name and minCompileSdk to 36 --- backtrace-library/build.gradle | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/backtrace-library/build.gradle b/backtrace-library/build.gradle index 41b12c5b8..912776ee9 100644 --- a/backtrace-library/build.gradle +++ b/backtrace-library/build.gradle @@ -18,7 +18,15 @@ android { defaultConfig { minSdk = 21 ndkVersion = '27.3.13750724' - buildConfigField("String", "VERSION_NAME", "\"${versionName}\"") + + // Compile against 37 without forcing consumers onto it. AGP otherwise derives + // minCompileSdk from compileSdk, which hard-fails the build of any app still on 36. + // Safe while no API-37-only type appears in the public API - the highest gate in the + // library is VERSION_CODES.R (30). Raise this only alongside such a dependency. + aarMetadata { + minCompileSdk = 36 + } + buildConfigField("String", "VERSION_NAME", "\"${libVersion}\"") testInstrumentationRunner = 'androidx.test.runner.AndroidJUnitRunner' externalNativeBuild { From 64454e398857c79ddd71d5f2851fac51ae12c1d5 Mon Sep 17 00:00:00 2001 From: Bartosz Litwiniuk <> Date: Mon, 24 Aug 2026 20:31:43 +0200 Subject: [PATCH 4/4] Turn off enableKotlin --- backtrace-library/build.gradle | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backtrace-library/build.gradle b/backtrace-library/build.gradle index 912776ee9..8d9aa5609 100644 --- a/backtrace-library/build.gradle +++ b/backtrace-library/build.gradle @@ -15,6 +15,12 @@ def libVersion = androidGitVersion.name() android { namespace = "backtraceio.library" compileSdk = 37 + + // AGP 9 turns built-in Kotlin on by default, which adds kotlin-stdlib to the `api` + // configuration and publishes it as a compile-scope dependency. This module is pure + // Java, so consumers would inherit the stdlib for no reason. Remove only if Kotlin + // sources are ever added here. + enableKotlin = false defaultConfig { minSdk = 21 ndkVersion = '27.3.13750724'