code: protected void copyCodeFiles(File rootPackage, File outDir, Replacement replaceFn) throws IOException {
          if (rootPackage.isFile()) {
              copyFile(rootPackage, outDir, replaceFn);
          } else {
              outDir.mkdirs();
              String[] names = rootPackage.list();
              if (names != null) {
                  for (String name: names) {
                      copyCodeFiles(new File(rootPackage, name), new File(outDir, name), replaceFn);
                  }
              }
          }
      }
docs: Copies all java/groovy/kotlin/scala code recursively. <code>replaceFn</code> is used to modify the content of files.