mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
enable buildConfig generation to better support AGP8 (#2143)
Since AGP8 this flag is disabled by default. Consumer projects have to enable this flag in them globally if the library doesn't do this correctly itself, but uses custom buildConfig fields. - What issues does the pull request solve? Please tag them so that they will get automatically closed once the PR is merged Solves Build Errors with default setup using AGP8+ - What is the feature? (if applicable) No errors and better build performance than the workaround in consuming projects would be.
This commit is contained in:
@@ -43,6 +43,11 @@ android {
|
||||
if (agpVersion.tokenize('.')[0].toInteger() >= 7) {
|
||||
namespace "com.horcrux.svg"
|
||||
}
|
||||
if (agpVersion.tokenize('.')[0].toInteger() >= 8) {
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
}
|
||||
}
|
||||
// Used to override the NDK path/version on internal CI or by allowing
|
||||
// users to customize the NDK path/version from their root project (e.g. for M1 support)
|
||||
if (rootProject.hasProperty("ndkPath")) {
|
||||
|
||||
Reference in New Issue
Block a user