After upgrading Android Gradle plugin to version 3.3.0 in one of my projects, I got several new warnings during syncing the project. Unfortunately, I have no idea how to tackle one of them. The warning is:
WARNING: API 'variant.getGenerateBuildConfig()' is obsolete and has been replaced with 'variant.getGenerateBuildConfigProvider()'. It will be removed at the end of 2019. For more information, see https://d.android.com/r/tools/task-configuration-avoidance. To determine what is calling variant.getGenerateBuildConfig(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.
The code line, which causes the warning is:
variant.generateBuildConfig.appPackageName
in one of my gradle files.
My question is, how should I use new Varaint API's method getGenerateBuildConfigProvider()
to retrieve appPackageName
? I've tried to look for docs for the API and I've also checked the link from the warning, but, sadly, I haven't found any useful information.