This leads to the fact that the gradle plug-in under test (not being in gradle cache yet, because it is just being built and tested) is not in the classpath of the nebula test of the plug-in...
Current code in GradleRunner:
static final Predicate<URL> CLASSPATH_USER_DIR = new Predicate<URL>() {
@Override
boolean apply(URL url) {
File userDir = new File(StandardSystemProperty.USER_DIR.value())
return url.path.startsWith(userDir.path)
}
}
This leads to the fact that the gradle plug-in under test (not being in gradle cache yet, because it is just being built and tested) is not in the classpath of the nebula test of the plug-in...
Current code in GradleRunner:
Debug logs show the problem right away:
Thus, it does not work on Windows, because of:
url.path
(It seems to be okay on Mac.)
The solution seems to be changing the return statement check of the
GradleRunner.CLASSPATH_USER_DIR
predicate like this for example: