diff --git a/src/main/java/edu/wpi/first/nativeutils/vendordeps/WPIVendorDepsExtension.java b/src/main/java/edu/wpi/first/nativeutils/vendordeps/WPIVendorDepsExtension.java index c934317..feb10a3 100644 --- a/src/main/java/edu/wpi/first/nativeutils/vendordeps/WPIVendorDepsExtension.java +++ b/src/main/java/edu/wpi/first/nativeutils/vendordeps/WPIVendorDepsExtension.java @@ -121,7 +121,7 @@ public void setHwSimulation(boolean value) { public static List vendorFiles(File directory) { if (directory.exists()) { return List.of(directory.listFiles(pathname -> { - return pathname.getName().endsWith(".json"); + return pathname.getName().endsWith(".json") && !pathname.isHidden(); })); } else { return List.of(); @@ -169,7 +169,7 @@ public void loadFrom(File directory) { try { load(dep); } catch(Exception e) { - throw new BuildException("Failed to load dependency", e); + throw new BuildException("Failed to load vendor dependency: " + f.getName(), e); } } } @@ -182,8 +182,8 @@ public void loadFrom(Project project) { private JsonDependency parse(File f) { try (BufferedReader reader = Files.newBufferedReader(f.toPath())) { return gson.fromJson(reader, JsonDependency.class); - } catch (IOException e) { - throw new RuntimeException(e); + } catch (Exception e) { + throw new BuildException("Failed to parse vendor dependency: " + f.getName(), e); } }