diff --git a/backtrace-library/build.gradle b/backtrace-library/build.gradle index 0fcda8ec..ad380618 100644 --- a/backtrace-library/build.gradle +++ b/backtrace-library/build.gradle @@ -19,11 +19,24 @@ if (libVersion == null || libVersion.trim().isEmpty() || libVersion.trim() == 'n 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 - compileSdk = 36 defaultConfig { minSdk = 21 ndkVersion = '27.3.13750724' + + // 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' @@ -56,7 +69,7 @@ android { } testCoverage { - jacocoVersion = "0.8.13" + jacocoVersion = "0.8.15" } externalNativeBuild { @@ -73,12 +86,12 @@ android { lint { abortOnError = true - targetSdk = 36 + targetSdk = 37 checkReleaseBuilds = true baseline = file('lint-baseline.xml') } testOptions { - targetSdk = 36 + targetSdk = 37 } } @@ -133,17 +146,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/backtrace-library/src/main/cpp/CMakeLists.txt b/backtrace-library/src/main/cpp/CMakeLists.txt index 192d84d8..9dae10cd 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 () diff --git a/example-app/build.gradle b/example-app/build.gradle index f8c26f06..2fdc7fe5 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' @@ -81,7 +81,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'