From a5dae2f54d799f47f2e6ff4ed598b1a841ce7ebc Mon Sep 17 00:00:00 2001 From: pvegh Date: Wed, 25 Oct 2023 11:44:50 +0200 Subject: [PATCH] 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. --- android/build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android/build.gradle b/android/build.gradle index 5dfc225ad..73b7b2f13 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -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")) {