GRADLE-2779 required for deployment on JBoss/WildFly

I’m struggling with GRADLE-2779 which prevents a successful deployment on JBoss/WildFly
when running on Windows. The task looks as follows:

task deploy(dependsOn: 'assemble', type: JavaExec) {
    main = 'org.jboss.modules.Main'
    classpath = files("${System.getenv('JBOSS_HOME')}/jboss-modules.jar")
    args '-mp'
    args "${System.getenv('JBOSS_HOME')}/modules"
    args ''
    args '-c'
    args '--command="deploy build/libs/shop.war --force"'

When the task is invoked, then the double-quote " in the last args is lost. When I try to duplicate the double-quote,
then I get 2 double-quotes. either no quotes or 2 quotes.
Therefore, it’s a pitty that Gradle can’t be used for development in JBoss and WildFly