Skip to content

Commit 020c366

Browse files
committed
append uuid at the end of the generated 'android.d.ts' file to prevent collisions
1 parent cd32109 commit 020c366

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dts-generator/src/main/java/com/telerik/dts/FileWriter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class FileWriter {
2222

2323
public FileWriter(File outDir, boolean writeMultipleFiles) {
2424
this.writeMultipleFiles = writeMultipleFiles;
25-
this.defaultDtsFileName = DEFAULT_DTS_FILE_NAME;
25+
this.defaultDtsFileName = DEFAULT_DTS_FILE_NAME + java.util.UUID.randomUUID().toString();
2626
this.outDir = outDir;
2727
}
2828

@@ -37,7 +37,7 @@ public void write(String content, String fileName) {
3737
String outFile = this.outDir.getAbsolutePath() + File.separator + this.defaultDtsFileName + ".d.ts";
3838
this.ps = new PrintStream(new FileOutputStream(outFile, /*append*/true));
3939

40-
//add helpers reference to the top of the file
40+
// add helpers reference to the top of the file
4141
if(this.isFirstRun) {
4242
ps.println("/// <reference path=\"./_helpers.d.ts\" />");
4343
this.isFirstRun = false;

0 commit comments

Comments
 (0)