Skip to content

Commit 6d243b8

Browse files
committed
fix(sbg): delete previously generated bindings file
1 parent 8253a31 commit 6d243b8

File tree

1 file changed

+4
-1
lines changed
  • test-app/build-tools/static-binding-generator/src/main/java/org/nativescript/staticbindinggenerator

1 file changed

+4
-1
lines changed

test-app/build-tools/static-binding-generator/src/main/java/org/nativescript/staticbindinggenerator/Main.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public static void main(String[] args) throws IOException, ClassNotFoundExceptio
3939
runJsParser(inputDir);
4040

4141
// generate java bindings
42+
try {
43+
new File(SBG_BINDINGS_NAME).delete();
44+
} catch (Exception e) {}
4245
String inputBindingFilename = Paths.get(System.getProperty("user.dir"), SBG_BINDINGS_NAME).toString();
4346
new Generator(outputDir, rows).writeBindings(inputBindingFilename);
4447
}
@@ -65,7 +68,7 @@ private static void validateInput() throws IOException {
6568
}
6669

6770
private static void runJsParser(File inputDir) throws IOException {
68-
String parserPath = Paths.get(System.getProperty("user.dir"),"jsparser", "js_parser.js").toString();
71+
String parserPath = Paths.get(System.getProperty("user.dir"), "jsparser", "js_parser.js").toString();
6972
String inputPath = inputDir.getAbsolutePath();
7073
String bindingsFilePath = Paths.get(System.getProperty("user.dir"), SBG_BINDINGS_NAME).toString();
7174
String interfaceNamesFilePath = Paths.get(System.getProperty("user.dir"), SBG_INTERFACE_NAMES).toString();

0 commit comments

Comments
 (0)