diff --git a/README.md b/README.md index 6c8814a..871f601 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,4 @@ raven run main.Main will be implemented should there arise a need. - [ ] Wrap errors properly, instead of hap-hazardly using `anyhow` - [ ] Maybe proper logging? -- [ ] Make `fs::expand_files()` skip over non-`.java` files or properly handle - that. - [ ] Fix using hashes to avoid unnesscesary recompilation. diff --git a/src/main.rs b/src/main.rs index 4091fae..f672301 100644 --- a/src/main.rs +++ b/src/main.rs @@ -185,7 +185,13 @@ fn new(project_name: String) -> anyhow::Result<()> { } fn build() -> anyhow::Result<()> { - let mut targets = crate::fs::expand_files(DIR_SRC.as_path())?; + let mut targets: Vec = crate::fs::expand_files(DIR_SRC.as_path())? + .into_iter() + .filter(|f| { + f.extension() + .is_some_and(|ext| ext.to_str().is_some_and(|ext| ext == JAVA_EXT_SOURCE)) + }) + .collect(); let mut nest_lock = NestLock::load().unwrap_or_default(); nest_lock.update();