private static String loadResource(String path) {
      try (
        InputStream stream = GradleProjectTaskRunner.class.getResourceAsStream(path);
        Reader reader = new InputStreamReader(stream, StandardCharsets.UTF_8)) {
        return StreamUtil.readText(reader);
      }
      catch (IOException e) {
        throw new IllegalStateException(String.format("Could not load resource '%s'", path), e);
      }
    }
private static String loadResource(String path)