Skip to content

Commit e0c2724

Browse files
committed
Rename the .library-depenedencies to _library_dependencies
Signed-off-by: Rahul Krishna <[email protected]>
1 parent 243bd5e commit e0c2724

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/main/java/com/ibm/northstar/CodeAnalyzer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ private static void analyze() throws IOException, ClassHierarchyException, CallG
136136

137137
}
138138
}
139+
// Cleanup library dependencies directory
140+
BuildProject.cleanLibraryDependencies();
139141

140142
// Convert the JavaCompilationUnit to JSON and add to consolidated json object
141143
String symbolTableJSONString = gson.toJson(symbolTable);

src/main/java/com/ibm/northstar/utils/BuildProject.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,19 @@ public static boolean downloadLibraryDependencies(String projectPath) {
153153
return false;
154154
}
155155
}
156+
157+
public void cleanLibraryDependencies() {
158+
if (libDownloadPath != null) {
159+
Log.info("Cleaning up library dependency directory: " + libDownloadPath);
160+
try {
161+
Files.walk(libDownloadPath)
162+
.filter(Files::isRegularFile)
163+
.map(Path::toFile)
164+
.forEach(File::delete);
165+
Files.delete(libDownloadPath);
166+
} catch (IOException e) {
167+
Log.error("Error deleting library dependency directory: " + e.getMessage());
168+
}
169+
}
170+
}
156171
}

0 commit comments

Comments
 (0)