多渠道改造
This commit is contained in:
parent
8e5b35e164
commit
fb640b7f4c
@ -37,6 +37,8 @@ android {
|
||||
versionCode 30
|
||||
versionName "3.1.0"
|
||||
|
||||
flavorDimensions "CHANNEL_VALUE"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
ndk {
|
||||
@ -71,11 +73,58 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
productFlavors {
|
||||
|
||||
dev {
|
||||
applicationId "com.oneclouds.cargo"
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "货主端(测试)",
|
||||
// app_icon : "@drawable/head_defaut",
|
||||
JPUSH_PKGNAME: applicationId,
|
||||
//JPush 上注册的包名对应的 Appkey.
|
||||
JPUSH_APPKEY : "fba6f55621c670d8c1fe9191",
|
||||
//暂时填写默认值即可.
|
||||
JPUSH_CHANNEL: "developer-n"]
|
||||
buildConfigField("String", "BASE_URL", "\"http://app.test.dahehuoyun.com/api/\"")
|
||||
buildConfigField "boolean", "isTest", "true"
|
||||
//APP名称,可以在androidMainfest中引用
|
||||
resValue "string", "appName", "货主端测试"
|
||||
}
|
||||
prod {
|
||||
applicationId "com.oneclouds.cargo"
|
||||
manifestPlaceholders = [CHANNEL_VALUE: "货主端",
|
||||
// app_icon : "@drawable/ysxy",
|
||||
JPUSH_PKGNAME: applicationId,
|
||||
//JPush 上注册的包名对应的 Appkey.
|
||||
JPUSH_APPKEY : "fba6f55621c670d8c1fe9191",
|
||||
//暂时填写默认值即可.
|
||||
JPUSH_CHANNEL: "developer-default"]
|
||||
buildConfigField("String", "BASE_URL", "\"http://app.dahehuoyun.com/api/\"")
|
||||
buildConfigField "boolean", "isTest", "false"
|
||||
resValue "string", "appName", "货主端"
|
||||
}
|
||||
}
|
||||
|
||||
// android.applicationVariants.all { variant ->
|
||||
// variant.outputs.all {
|
||||
// def date = new Date().format("MMdd_HH-mm" , TimeZone.getTimeZone("GMT+08"))
|
||||
// if(variant.buildType.name.equals('release')){
|
||||
// outputFileName = "dhhy-cargo-"+date+"-${versionName}.apk"
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
android.applicationVariants.all { variant ->
|
||||
variant.outputs.all {
|
||||
def date = new Date().format("MMdd_HH-mm" , TimeZone.getTimeZone("GMT+08"))
|
||||
if(variant.buildType.name.equals('release')){
|
||||
outputFileName = "dhhy-cargo-"+date+"-${versionName}.apk"
|
||||
//获取渠道名称
|
||||
def isText = variant.productFlavors[0].properties.get("buildConfigFields").getAt("isTest").properties.get("value")
|
||||
def appName = null
|
||||
if (isText == "true") {
|
||||
appName = '货主端测试_'
|
||||
} else {
|
||||
appName = '货主端正式_'
|
||||
}
|
||||
variant.outputs.all {
|
||||
outputFileName = appName+"_${variant.productFlavors[0].name}_v${variant.productFlavors[0].versionName}.apk"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -47,7 +47,9 @@
|
||||
android:excludeFromRecents="true"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:largeHeap="true">
|
||||
|
||||
<meta-data
|
||||
android:name="CHANNEL"
|
||||
android:value="${CHANNEL_VALUE}" />
|
||||
|
||||
<meta-data
|
||||
android:name="com.amap.api.v2.apikey"
|
||||
|
@ -139,7 +139,7 @@ public class OrderRequest {
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
map.put("isPlatDispatch",0);
|
||||
map.put("orderId",id);
|
||||
map.put("remark","货主取消");
|
||||
map.put("remark","取消运单");
|
||||
Request re = OkHttpUtil.posts(new OkDate(UrlManager.getOrderRevoke(), "post", MapUtil.mapJson(map)),getToken(con),con);
|
||||
RequestTest.test(1,ORDER_REVOKE,re,con,hd);
|
||||
}
|
||||
|
@ -3,6 +3,8 @@ package com.oneclouds.cargo.request.manager;
|
||||
import static com.oneclouds.cargo.request.OrderRequest.CAR_TYPE;
|
||||
import static com.oneclouds.cargo.request.OrderRequest.GOODS_TYPE;
|
||||
|
||||
import com.oneclouds.cargo.BuildConfig;
|
||||
|
||||
/**
|
||||
* @author hlh
|
||||
* @version 1.0.0
|
||||
@ -12,7 +14,7 @@ import static com.oneclouds.cargo.request.OrderRequest.GOODS_TYPE;
|
||||
public class UrlManager {
|
||||
|
||||
//域名地址
|
||||
public static final String BASE_URL = "http://app.test.dahehuoyun.com/api";
|
||||
public static final String BASE_URL = BuildConfig.BASE_URL;
|
||||
//http://request.one-clouds.com/api
|
||||
/*--货物小类管理--*/
|
||||
|
||||
|
@ -2,6 +2,7 @@ package com.oneclouds.cargo.request.net;
|
||||
|
||||
|
||||
import com.dahe.mylibrary.net.CommonResponseBean;
|
||||
import com.oneclouds.cargo.BuildConfig;
|
||||
import com.oneclouds.cargo.bean.OrderBean2;
|
||||
import com.oneclouds.cargo.request.bean.CommonBodyBean;
|
||||
import com.oneclouds.cargo.request.bean.OrderInputBean;
|
||||
@ -17,7 +18,7 @@ import retrofit2.http.Query;
|
||||
|
||||
public interface Api {
|
||||
|
||||
String BASE_URL = "http://app.test.dahehuoyun.com/api/";
|
||||
String BASE_URL = BuildConfig.BASE_URL;
|
||||
|
||||
|
||||
//获取版本
|
||||
|
Loading…
Reference in New Issue
Block a user