From 0677344f8502b3ae15a3128bf239cf5571b92443 Mon Sep 17 00:00:00 2001 From: Peter Lazar Date: Mon, 26 Jun 2023 11:54:09 +0200 Subject: [PATCH] feat(android): Use `android.namespace` for AGP 8 and RN 0.73 (#3133) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Peter Lazar Co-authored-by: Kryštof Woldřich <31292499+krystofwoldrich@users.noreply.github.com> --- CHANGELOG.md | 4 ++++ android/build.gradle | 5 +++++ 2 files changed, 9 insertions(+) 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)