A suggestion is to create a fat jar and execute the test cases only from the fat jar. Alternatively as the links suggest use the manifest trick. However, as far as I understand this needs to be applied directly to the plugin (grails, findbugs, sonarqube) all had similar problems.
On windows I cant execute the testcompile statement https://stackoverflow.com/questions/50707110/gradle-windows-java-io-ioexception-createprocess-error-206-filename-is-too-lon as the path is too long.
A suggestion is to create a fat jar and execute the test cases only from the fat jar. Alternatively as the links suggest use the manifest trick. However, as far as I understand this needs to be applied directly to the plugin (grails, findbugs, sonarqube) all had similar problems.