Migration¶
You can migrate existing dependencies, so they use the version placeholder in order to have their available updates found by refreshVersions and easily applied.
We provide an experimental interactive Gradle task made for migration.
To use it, run the following command and follow the instructions:
./gradlew migrateToRefreshVersionsDependenciesConstants --console=plain
About the experimental status¶
That migration task is safe to use (except if you have different modules with different versions of the same dependency family), but its UX has a few known issues. Here’s the improvement plan:
- Ergonomics (Don’t require to type a full word to validate migration of a single dependency)
- Keep track of what has been migrated already to not show out of sync hardcoded dependencies count
- Automatically replace dependency notations in the build files when possible safely
- Have better rules to ignore dependencies added by plugins (e.g. “kotlin-android-extensions” plugin)
- Its name (remove lengthy
migrateToRefreshVersionsDependenciesConstants
and have a--migrate
flag torefreshVersions
redirect to it instead)
These improvements are planned for the 1.0 release.
You can follow this issue to track when it is resolved exactly, and you can also vote for it with a 👍.