refreshVersions
refreshVersions copied to clipboard
Dependency with dependency configuration isn't migrated correctly
- [x] I have read the guidelines for submitting issues
🐛 Describe the bug
Dependencies with exclude are migrated and won't compile any more. E.g.
implementation("androidx.preference:preference-ktx:_") {
exclude(group = "androidx.lifecycle", module = "lifecycle-viewmodel-ktx")
}
is migrated to:
implementation(AndroidX.preference.ktx) {
exclude(group = "androidx.lifecycle", module = "lifecycle-viewmodel-ktx")
}
which doesn't compile
⚠️ Current behavior
see above
✅ Expected behavior
It should either be not migrated at all or migrated to include a dependencyConfiguration: Action<ExternalModuleDependency>
💣 Steps to reproduce
run ./gradlew refreshVersionMigrate in a project with exclude dependency configuration.
You can try adding toString() to the dependency notation as a workaround.
@LouisCAD yes that works but I can also change it back to "androidx.preference:preference-ktx:_", it's both manual effort. I appreciate the effort behind the library. I do however have more and more cases that I need to correct manually after each migration. While I'm willing to do that in my own projects, I cannot recommend the use of the plugin in my professional environment (yet).
You don't have to migrate every single time…
@LouisCAD I migrate when I add a new dependency which I do a lot since I work on many different repos at a time. It's not hard to manually revert the faulty changes because I know them by now. In a professional environment however it's difficult to make sure that's done properly ("run the migration, then revert the following changes: .. list of changes to revert"). I hope that makes sense.