private List<String> readDescriptor(URL url) {
    try(BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()))) {
      List<String> lines = new ArrayList<>();
      String line = reader.readLine();
      while (line != null) {
        line = line.trim();
        if (line.length() > 0 && !line.startsWith("#"))
          lines.add(line);
        line = reader.readLine();
      }
      return lines;
    } catch (IOException e) {
      throw new ExtensionException("Failed to read extension descriptor '%s'", e).withArgs(url);
    }
  }
Scans class path for extension descriptors and loads the extension classes specified therein.
spock-core/src/main/java/org/spockframework/runtime/ExtensionClassesLoader.java