How to manage Dependency Version Variable in Android?

There are 2 conditions for declaring dependency variables in Android:
- For Single Module use
- For Multiple Module use (i.e. same Dependency Version Variable will be used in different modules of the same project.)
- For Single Module use only: In this method, we have to perform the following steps in build.gradle(app) file.
Step 1: Use “def” keyword for declaration & definition of the variable
Step 2: Replace single quotes (‘ ’) with double quotes (“ ”)
Step 3: Replace the version number with the dependency version variable name

2. For Multiple Module use: In this method, we will declare and define the dependency version variable in build.gradle(Project) file.
- The syntax for defining the variable is ext.variable_name = “version_number”

If you want to keep updated about Android tips & tricks then follow me.
LinkedIn: https://www.linkedin.com/in/adv11/
Twitter: https://twitter.com/adv2612