Skip to content

Commit 0c94f8f

Browse files
authored
Merge pull request #782 from NativeScript/pete/sbg-changes
Static Binding Generator small changes
2 parents 9ebf503 + b6d603a commit 0c94f8f

File tree

2 files changed

+5
-2
lines changed
  • android-static-binding-generator/project

2 files changed

+5
-2
lines changed

android-static-binding-generator/project/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ task runAstParser(type: RunAstParserTask) {
170170
// 2. all subdirectories that do not have a package.json containing a "nativescript" key are skipped
171171
task traverseJsFiles () {
172172
doFirst {
173+
// invalidate previously generated bindings.txt file
174+
// todo: remove when removing previously generated bindings is implemented
175+
new File(bindingsFileP).delete()
173176
traverseDirectory(jsCodeAbsolutePath, false)
174177
}
175178
}

android-static-binding-generator/project/staticbindinggenerator/src/main/java/org/nativescript/staticbindinggenerator/Generator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ public void writeBindings(String filename) throws IOException, ClassNotFoundExce
6363
// Compare text contents for equality
6464
String content = new String(Files.readAllBytes(Paths.get(b.getFile().toString())));
6565
if (content.equals(b.getContent())) {
66-
System.out.println("Warning: File already exists. This could mean the same code has been parsed more than once from two or more different files.");
66+
System.out.println("Warning: File already exists. This could mean the same code has been parsed more than once from two or more different files. \nFile:" + b.getFile());
6767
} else {
68-
throw new IOException("File already exists. This may lead to undesired behavior.\nPlease change the name of one of the extended classes.\n" + b.getFile());
68+
throw new IOException("File already exists. This may lead to undesired behavior.\nPlease change the name of one of the extended classes.\nFile:" + b.getFile() + " Class: " + b.getClassname());
6969
}
7070
}
7171
}

0 commit comments

Comments
 (0)