platan/idea-gradle-dependencies-formatter

map to string notation with variables isn't handled properly

bj0 opened this issue · 2 comments

bj0 commented

If you try to convert a map notation that uses a variable (not a variable in a string) to string notation, it does not treat it as a variable. This results in the following:

testImplementation group: 'org.mockito', name: 'mockito-core', version: mockitoVersion

becoming

testImplementation 'org.mockito:mockito-core:mockitoVersion'

Which requries fixing the variable reference as well as replacing single quotes with double quotes.

Thanks @bj0 for reporting this. This actually is a common use case, but I didn't test it. I will try to fix this in the next weeks.