1
0
mirror of synced 2026-08-07 07:56:55 +00:00

fix: update paths in api-generator after #2

This commit is contained in:
Yury Semikhatsky
2020-10-08 09:16:14 -07:00
parent 1cfa001173
commit a005249c6d
@@ -727,9 +727,8 @@ public class ApiGenerator {
ApiGenerator(Reader reader) throws IOException {
JsonObject api = new Gson().fromJson(reader, JsonObject.class);
File cwd = FileSystems.getDefault().getPath(".").toFile();
File dir = new File(cwd, "../lib/src/main/java/com/microsoft/playwright");
File dir = new File(cwd, "lib/src/main/java/com/microsoft/playwright");
System.out.println("Writing files to: " + dir.getCanonicalPath());
dir.mkdirs();
for (Map.Entry<String, JsonElement> entry: api.entrySet()) {
String name = entry.getKey();
List<String> lines = new ArrayList<>();
@@ -744,7 +743,7 @@ public class ApiGenerator {
public static void main(String[] args) throws IOException {
File cwd = FileSystems.getDefault().getPath(".").toFile();
System.out.println(cwd.getCanonicalPath());
File file = new File(cwd, "src/main/resources/api.json");
File file = new File(cwd, "api-generator/src/main/resources/api.json");
System.out.println("Reading from: " + file.getCanonicalPath());
new ApiGenerator(new FileReader(file));
}