This project explains how to share gradle buildConfigField variables with multiple modules.
Clone the project, build it and read the comments to know how to share variables with multiple modules.
There are two different ways to declare shared variables (both explained in this project) :
- In project level gradle
- In a separate gradle file (config.gradle in this example project)
Use one of the above option as per your preference.