diff --git a/CHANGELOG.md b/CHANGELOG.md index baa0e3c42..3ed7ac3eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Features + +- Use `android.namespace` for AGP 8 and RN 0.73 ([#3133](https://github.com/getsentry/sentry-react-native/pull/3133)) + ### Dependencies - Bump JavaScript SDK from v7.54.0 to v7.56.0 ([#3119](https://github.com/getsentry/sentry-react-native/pull/3119)) diff --git a/android/build.gradle b/android/build.gradle index b186c4aa1..b4e739ccb 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -14,6 +14,11 @@ if (isNewArchitectureEnabled()) { android { compileSdkVersion safeExtGet('compileSdkVersion', 31) + // Conditional for compatibility with AGP <4.2. + if (project.android.hasProperty("namespace")) { + namespace = "io.sentry.react" + } + defaultConfig { minSdkVersion safeExtGet('minSdkVersion', 21) targetSdkVersion safeExtGet('targetSdkVersion', 31)