Skip to content

Commit 691f2db

Browse files
authored
feat(android): Add buildFeatures.buildConfig=true to support AGP 8 (#3298)
1 parent 22e31b6 commit 691f2db

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Features
6+
7+
- Add `buildFeatures.buildConfig=true` to support AGP 8 ([#3298](https://github.com/getsentry/sentry-react-native/pull/3298))
8+
59
### Fixes
610

711
- Change log output to show what paths are considered when collecting modules ([#3316](https://github.com/getsentry/sentry-react-native/pull/3316))

android/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ android {
1919
namespace = "io.sentry.react"
2020
}
2121

22+
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
23+
if (agpVersion.tokenize('.')[0].toInteger() >= 8) {
24+
buildFeatures {
25+
buildConfig = true
26+
}
27+
}
28+
2229
defaultConfig {
2330
minSdkVersion safeExtGet('minSdkVersion', 21)
2431
targetSdkVersion safeExtGet('targetSdkVersion', 31)

0 commit comments

Comments
 (0)