Javaexec not including '*:' in address= for >= java 9 debugOptions

As of Java 9, when defining the agentlib arguments for jdwp and jvm startup you are now required to define the address= as ‘address=*:8000’ or you can’t remotely connect a debugger to a jvm running in a docker container.

If I specify

debugOptions {

The JVM command line argument built is
and it needs to be this instead for java9 and above

When I try a simple jdb -attach from outside a docker container with the first agentlib definition I get a handshake error. When I change it to the second, the jdb -attach works fine.