mirror of
https://github.com/jht5945/buildj.git
synced 2025-12-29 18:30:05 +08:00
use consts
This commit is contained in:
@@ -18,6 +18,10 @@ use super::{
|
|||||||
misc::*,
|
misc::*,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const M2_HOME: &str = "M2_HOME";
|
||||||
|
const MAVEN_HOME: &str = "MAVEN_HOME";
|
||||||
|
const GRADLE_HOME: &str = "GRADLE_HOME";
|
||||||
|
|
||||||
pub const LOCAL_BUILDER_HOME_BASE_DIR: &str = ".jssp/builder";
|
pub const LOCAL_BUILDER_HOME_BASE_DIR: &str = ".jssp/builder";
|
||||||
const STANDARD_CONFIG_JSON: &str = ".standard_config.json";
|
const STANDARD_CONFIG_JSON: &str = ".standard_config.json";
|
||||||
const TOOL_PACKAGE_DETAIL_URL: &str = "https://hatter.ink/tool/query_tool_by_name_version.json";
|
const TOOL_PACKAGE_DETAIL_URL: &str = "https://hatter.ink/tool/query_tool_by_name_version.json";
|
||||||
@@ -38,8 +42,8 @@ pub struct BuilderDesc {
|
|||||||
impl BuilderDesc {
|
impl BuilderDesc {
|
||||||
pub fn get_builder_home_name(&self) -> Vec<String> {
|
pub fn get_builder_home_name(&self) -> Vec<String> {
|
||||||
match self.name {
|
match self.name {
|
||||||
BuilderName::Maven => vec!["M2_HOME".to_string(), "MAVEN_HOME".to_string()],
|
BuilderName::Maven => vec![M2_HOME.to_string(), MAVEN_HOME.to_string()],
|
||||||
BuilderName::Gradle => vec!["GRADLE_HOME".to_string()],
|
BuilderName::Gradle => vec![GRADLE_HOME.to_string()],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user