You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Its a widely known best practice among android folks to avoid hardcoding version numbers of dependencies inside app/build.gradle. Instead its recommended to store it either in root build.gradle or in the same gradle file but as variables and then refer these variables.
It makes it much easier to update because then you can reuse one variable in different dependency and also easier to read for other contributors.
For example in root build.gradle
supportLib = '27.0.2'
and in app/build.gradle
// App's support dependencies
implementation "com.android.support:appcompat-v7:$rootProject.supportLib"
implementation "com.android.support:support-v4:$rootProject.supportLib"
The text was updated successfully, but these errors were encountered:
Its a widely known best practice among android folks to avoid hardcoding version numbers of dependencies inside
app/build.gradle
. Instead its recommended to store it either in rootbuild.gradle
or in the same gradle file but as variables and then refer these variables.It makes it much easier to update because then you can reuse one variable in different dependency and also easier to read for other contributors.
For example in root
build.gradle
and in
app/build.gradle
The text was updated successfully, but these errors were encountered: