Replace dependency constants by dependency notations
Wording changes for future docs and changelogs
First, we use the wording "dependency constant", but in some cases like the Firebase group, we are already not using actual constants (in Kotlin terms), and we will steer away from it further to improve BoM support (as discussed over the phone with @jmfayard).
Consequently, I am suggesting that we use the wording "dependency notation" instead (which is how Gradle calls these) instead, and I'm starting by edits of existing references to the old wording on the website/docs.
Replacing inlined constants by property getters or fields
~In the post The Dark Secrets of Fast Compilation for Kotlin from Kotlin's official blog, we discovered that incremental compilation (which is coming to Gradle in version 6.8) is hindered by usage of const val, so we will replace these inlined constants by property getters or fields.~ EDIT: const val whose value don't change don't actually break incremental compilation, that was a misundertsanding from me as an incremental compilation beginner.
We are currently leaning towards all getters because it brings possibilities like supporting BoM in a safe way.
The exact design is still under consideration, especially as to if we allow to integrate version key rules contextually (as opposed to the current rules files currently used), and how.
Here's a list of new features that we can offer with this change (will be updated with new ideas):
- Allow to enable BoM for a whole dependency group by just adding the dependency before the ones from the BoM.
- Allow forcing use of BoMs when one is known (with allowlist for exceptions). Could be enabled by default for
Firebaselibs for example. - Allow disabling version placeholder for a dependency group or a specific dependency for a module or whole project (for use with custom platform/BoM, version constraints, gradle plugin defining the versions)
- Track usage of the dependency constants. Can be useful in the migration tool for example.