title: getResourceAsStream returns null on win10 if used in gradle plugin task
body: <p>I need to copy a file from gradle plugin jar to a root of a project that applies the plugin as part of gradle task.</p>
  
  <p>I have a file in gradle plugin jar placed in <code>src/main/resources/data/file</code></p>
  
  <p>I have the following code in gradle task:</p>
  
  <pre><code>String filename = "data" + File.separator + "file";
  final InputStream stream= classLoader.getResourceAsStream(fileName);
  final Path filePath = new File(filename).toPath();
  new File("data").mkdirs();
  try {
      Files.copy(stream, filePath , StandardCopyOption.REPLACE_EXISTING);
  } catch (IOException e) {
      throw new PluginApplicationException("Failed to apply plugin", e);
  }
  
  </code></pre>
  
  <p>I expect this code to take a file from gradle plugin jar and put it into a /data/file.
  It works fine on linux when I run the plugin task, but it crashes on windows because <code>classLoader.getResourceAsStream(fileName);</code> returns null.</p>
  
  <p>I tried to use different ways to fetch class loader, but it is always VisitableURLClassLoader on both windows and linux. Does anybody have an idea why it is null on windows?</p>