Skip to content
Closed
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
15 changes: 14 additions & 1 deletion packages/core/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ dependencies {
// From 2.21.0, it uses 1.0.0-beta02, which requires Gradle 8.6.0.
// This breaks builds if the React Native target is below 0.76.0. as it relies on Gradle 8.5.0.
// To avoid this, we enforce 1.0.0-beta01 on RN < 0.76.0
if (reactNativeMinorVersion < 76) {
if (reactNativeMajorVersion == 0 && reactNativeMinorVersion < 76) {
implementation("com.datadoghq:dd-sdk-android-rum:2.25.0") {
exclude group: "androidx.metrics", module: "metrics-performance"
}
Expand Down Expand Up @@ -286,4 +286,17 @@ project.afterEvaluate {
project.android.unitTestVariants.all { variant ->
variant.registerPreJavacGeneratedBytecode(outputJarDependency)
}

// dd-sdk-android-rum requires androidx.metrics:metrics-performance.
// From 2.21.0, it uses 1.0.0-beta02, which requires Gradle 8.6.0.
// This breaks builds if the React Native target is below 0.76.0. as it relies on Gradle 8.5.0.
// To avoid this, we enforce 1.0.0-beta01 on RN < 0.76.0
// This resolution ensures that version 1.0.0-beta01 will be used even if another dependency also includes androidx.metrics:metrics-performance
if (reactNativeMajorVersion == 0 && reactNativeMinorVersion < 76) {
configurations.all {
resolutionStrategy {
force 'androidx.metrics:metrics-performance:1.0.0-beta01'
}
}
}
}
Loading