defaultTasks incompatible with '--refresh dependencies'

I’ll answer my own post. I now understand that the ‘–refresh dependencies’ is a command line switch followed by a command line switch argument. Thus executing “gradle --refresh dependencies” is equivalent to just executing “gradle” with no tasks (as far as task execution is concerned).

Not sure if this is the most intuitive interface as there is an actual “dependencies” task so you could potentially execute “gradle --refresh dependencies dependencies” where the two dependencies strings have totally different meanings. I think this is a potential source of confusion.

My immediate issue is however resolved so we can close this thread.