Please do not split topics across several threads.
This makes following the conversation in the threads view very hard as the context of the other messages is missing.
If you have additional information either edit the original message or post to its thread.
Regarding the problem, that has nothing to do with Gradle, but with the shell you use. I guess you just CMD, where the caret is used as escape character. And as is with most escape characters, just double it. Alternatively it will probably also work to wrap the argument in quotes. But that is all handled by your terminal, not Gradle.