diff options
author | Mario Arias <mario@marioarias.org> | 2019-12-19 23:17:50 +0800 |
---|---|---|
committer | Matan Kushner <hello@matchai.me> | 2019-12-19 10:17:50 -0500 |
commit | aab35674d2ca94a5d5debaf1caa5883e7c65bff3 (patch) | |
tree | a1ef7efe8a13fb585ea4b128bab25b6803796e89 | |
parent | 63594b746e394ac6714025c833168b0f24aabd41 (diff) |
feat: Adds build.gradle.kts detection to the Java module (#731)
-rw-r--r-- | docs/config/README.md | 2 | ||||
-rw-r--r-- | src/modules/java.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/docs/config/README.md b/docs/config/README.md index 953f7b839..b5519cee3 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -802,7 +802,7 @@ style = "bold dimmed green" 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` or `build.sbt` file +- 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 ### Options diff --git a/src/modules/java.rs b/src/modules/java.rs index 0b0feaaca..4ad8ac483 100644 --- a/src/modules/java.rs +++ b/src/modules/java.rs @@ -9,11 +9,11 @@ use crate::utils; /// /// 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` or `build.sbt` file +/// - Current directory contains a `pom.xml`, `build.gradle`, `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.sbt"]) + .set_files(&["pom.xml", "build.gradle", "build.gradle.kts", "build.sbt"]) .set_extensions(&["java", "class", "jar"]) .is_match(); |