summaryrefslogtreecommitdiffstats
path: root/src/modules/java.rs
diff options
context:
space:
mode:
authorShu Kutsuzawa <cappyzawa@yahoo.ne.jp>2020-04-04 04:02:28 +0900
committerGitHub <noreply@github.com>2020-04-03 21:02:28 +0200
commitbd016b6ce2648d66c0d1db7aeed158e769f03383 (patch)
tree47a0a0e75a42753a0649eb83699194da9af05360 /src/modules/java.rs
parente38be5073fd09ec1b199c6d542d34a7f76e3d5fd (diff)
feat: Enable to display language version when `.<lang>-version` file exists. (#1028)
* adjust https://github.com/sonnym/elmenv * adjust https://github.com/syndbg/goenv * adjust https://github.com/jenv/jenv * adjust https://github.com/nodenv/nodenv * adjust https://github.com/phpenv/phpenv * adjust https://github.com/rbenv/rbenv * add description * golang.rs is executed rustfmt * add testcases
Diffstat (limited to 'src/modules/java.rs')
-rw-r--r--src/modules/java.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/java.rs b/src/modules/java.rs
index 1b9e709b1..177e95451 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`, `.gradle` or `.jar` extension
-/// - Current directory contains a `pom.xml`, `build.gradle.kts` or `build.sbt` file
+/// - Current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt` or `.java-version` 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.kts", "build.sbt"])
+ .set_files(&["pom.xml", "build.gradle.kts", "build.sbt", ".java-version"])
.set_extensions(&["java", "class", "jar", "gradle"])
.is_match();