diff options
-rw-r--r-- | docs/config/README.md | 4 | ||||
-rw-r--r-- | src/modules/java.rs | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/docs/config/README.md b/docs/config/README.md index 5f4387638..4de9ae7af 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -774,8 +774,8 @@ pure_msg = "pure shell" The `java` module shows the currently installed version of Java. The module will be shown if any of the following conditions are met: -- The current directory contains a `pom.xml`, `build.gradle`, `build.gradle.kts` or `build.sbt` file -- The current directory contains a file with the `.java`, `.class` or `.jar` extension +- The current directory contains a `pom.xml`, `build.gradle.kts` or `build.sbt` file +- The current directory contains a file with the `.java`, `.class`, `.gradle` or `.jar` extension ### Options diff --git a/src/modules/java.rs b/src/modules/java.rs index 4ad8ac483..1b9e709b1 100644 --- a/src/modules/java.rs +++ b/src/modules/java.rs @@ -8,13 +8,13 @@ use crate::utils; /// Creates a module with the current Java version /// /// Will display the Java version if any of the following criteria are met: -/// - Current directory contains a file with a `.java`, `.class` or `.jar` extension -/// - Current directory contains a `pom.xml`, `build.gradle`, `build.gradle.kts` or `build.sbt` file +/// - Current directory contains a file with a `.java`, `.class`, `.gradle` or `.jar` extension +/// - Current directory contains a `pom.xml`, `build.gradle.kts` or `build.sbt` file pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> { let is_java_project = context .try_begin_scan()? - .set_files(&["pom.xml", "build.gradle", "build.gradle.kts", "build.sbt"]) - .set_extensions(&["java", "class", "jar"]) + .set_files(&["pom.xml", "build.gradle.kts", "build.sbt"]) + .set_extensions(&["java", "class", "jar", "gradle"]) .is_match(); if !is_java_project { |