Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 21 additions & 8 deletions backtrace-library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Comment thread
BartoszLitwiniuk marked this conversation as resolved.
minCompileSdk = 36
}

buildConfigField("String", "VERSION_NAME", "\"${libVersion}\"")
testInstrumentationRunner = 'androidx.test.runner.AndroidJUnitRunner'

Expand Down Expand Up @@ -56,7 +69,7 @@ android {
}

testCoverage {
jacocoVersion = "0.8.13"
jacocoVersion = "0.8.15"
}

externalNativeBuild {
Expand All @@ -73,12 +86,12 @@ android {

lint {
abortOnError = true
targetSdk = 36
targetSdk = 37
checkReleaseBuilds = true
baseline = file('lint-baseline.xml')
}
testOptions {
targetSdk = 36
targetSdk = 37
}
}

Expand Down Expand Up @@ -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 {
Expand Down
7 changes: 7 additions & 0 deletions backtrace-library/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <libunwind.h> 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 ()

Expand Down
6 changes: 3 additions & 3 deletions example-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down
Loading