[6.6.0]
[项目结构、扫码枪添加手机号]
This commit is contained in:
50
foudations/mogo-commons/src/main/java/com/mogo/commons/env/ProjectUtils.kt
vendored
Normal file
50
foudations/mogo-commons/src/main/java/com/mogo/commons/env/ProjectUtils.kt
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
package com.mogo.commons.env
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
|
||||
object ProjectUtils {
|
||||
fun isSaas(): Boolean {
|
||||
return DebugConfig.getProjectFlavor() == Project.SAAS.value
|
||||
}
|
||||
|
||||
fun isDali(): Boolean {
|
||||
return DebugConfig.getProjectFlavor() == Project.DALI.value
|
||||
}
|
||||
|
||||
fun isMogo(): Boolean {
|
||||
return DebugConfig.getProjectFlavor() == Project.MOGO.value
|
||||
}
|
||||
|
||||
fun isYantai(): Boolean {
|
||||
return DebugConfig.getProjectFlavor() == Project.YANTAI.value
|
||||
}
|
||||
|
||||
fun getProjectType(): Project {
|
||||
when (DebugConfig.getProjectFlavor()) {
|
||||
Project.DALI.value -> {
|
||||
return Project.DALI
|
||||
}
|
||||
|
||||
Project.SAAS.value -> {
|
||||
return Project.SAAS
|
||||
}
|
||||
|
||||
Project.MOGO.value -> {
|
||||
return Project.MOGO
|
||||
}
|
||||
|
||||
Project.YANTAI.value -> {
|
||||
return Project.YANTAI
|
||||
}
|
||||
}
|
||||
return Project.MOGO
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
enum class Project(val value: String) {
|
||||
SAAS("saas"),
|
||||
DALI("dali"),
|
||||
MOGO("mogo"),
|
||||
YANTAI("yantai")
|
||||
}
|
||||
Reference in New Issue
Block a user