Commit 7c16a2b2 authored by fengruiyu's avatar fengruiyu

编译时生成的文件,一般用于编译的版本控制

parent 51ebdcfb
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
</set> </set>
</option> </option>
<option name="resolveModulePerSourceSet" value="false" /> <option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings> </GradleProjectSettings>
</option> </option>
</component> </component>
......
...@@ -19,6 +19,22 @@ android { ...@@ -19,6 +19,22 @@ android {
sourceCompatibility rootProject.ext.java_version["compileJavaVersion"] sourceCompatibility rootProject.ext.java_version["compileJavaVersion"]
targetCompatibility rootProject.ext.java_version["targetJavaVersion"] targetCompatibility rootProject.ext.java_version["targetJavaVersion"]
} }
productFlavors {
// 开发版本
auto {
buildConfigField ('boolean','IS_DEV',"true")
manifestPlaceholders = [
app_logo_name: "Auto"
]
}
// 线上产品版本
product {
buildConfigField ('boolean','IS_DEV',"false")
manifestPlaceholders = [
app_logo_name: "线上"
]
}
}
} }
dependencies { dependencies {
......
# 环境名
name=product
api.base.url=https://
isProduct=true
\ No newline at end of file
# 环境名 默认
name=test
api.base.url=http://apitest.
isProduct=false
\ No newline at end of file
{
"supplier":{
"vivo":{
"appid":"103881568"
},
"xiaomi":{
"appid": "2882303761518348857"
},
"huawei":{
"appid": "101833995"
},
"oppo":{
"appid": "30251013"
}
}
}
# 环境名
name=product
api.base.url=https://api.
isProduct=true
\ No newline at end of file
{
"supplier":{
"vivo":{
"appid":"103881568"
},
"xiaomi":{
"appid": "2882303761518348857"
},
"huawei":{
"appid": "101833995"
},
"oppo":{
"appid": "30251013"
}
}
}
...@@ -52,6 +52,16 @@ android { ...@@ -52,6 +52,16 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }
} }
productFlavors {
//包含所有环境
auto {
buildConfigField ("boolean","IS_DEV","true")
}
// 线上产品版本
product {
buildConfigField ("boolean","IS_DEV","false")
}
}
compileOptions { compileOptions {
......
...@@ -63,14 +63,8 @@ public class PropertyUtils { ...@@ -63,14 +63,8 @@ public class PropertyUtils {
public static ConfigManager.EnvironmentType environmentMap() { public static ConfigManager.EnvironmentType environmentMap() {
String envName = getEnvironmentName(); String envName = getEnvironmentName();
switch (envName){ switch (envName){
case "uat":
return ConfigManager.EnvironmentType.UAT;
case "product": case "product":
return ConfigManager.EnvironmentType.PRODUCT; return ConfigManager.EnvironmentType.PRODUCT;
case "pre":
return ConfigManager.EnvironmentType.PRE;
case "apifz":
return ConfigManager.EnvironmentType.API_FZ;
default: default:
return ConfigManager.EnvironmentType.TEST; return ConfigManager.EnvironmentType.TEST;
} }
......
#Wed Jun 30 14:54:57 CST 2021 #Wed Jun 30 17:38:32 CST 2021
VERSION_BUILD=2207 VERSION_BUILD=2228
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment