mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat: Adds build.gradle.kts detection to the Java module (#731)
This commit is contained in:
committed by
Matan Kushner
parent
63594b746e
commit
aab35674d2
+2
-2
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user