123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- ext {
- // 测试服
- def SERVER_TYPE_TEST = "test"
- // 预发布服
- def SERVER_TYPE_PREVIEW = "pre"
- // 正式服
- def SERVER_TYPE_PRODUCT = "product"
- def taskName = project.gradle.startParameter.taskNames[0]
- if (taskName == null) {
- taskName = ""
- }
- // 打印当前执行的任务名称
- println "GradleLog TaskNameOutput " + taskName
- def serverType = SERVER_TYPE_PRODUCT
- if (taskName.endsWith("Debug")) {
- serverType = SERVER_TYPE_TEST
- } else if (taskName.endsWith("Preview")) {
- serverType = SERVER_TYPE_PREVIEW
- }
- // 从 Gradle 命令中读取参数配置,例如:./gradlew assembleRelease -P ServerType="test"
- if (project.hasProperty("ServerType")) {
- serverType = project.properties["ServerType"]
- }
- // 打印当前服务器配置
- println "GradleLog ServerTypeOutput " + serverType
- // 友盟 AppKey
- UMENG_APP_KEY = "61b1c29ee0f9bb492b8b5d9b"
- // QQ AppId
- QQ_APP_ID = ""
- // QQ Secret
- QQ_APP_SECRET = ""
- // 微信 AppId
- WX_APP_ID = "wx182f1f0cd7e46e13"
- // 微信 Secret
- WX_APP_SECRET = "8997764aaf76eb2ef2f8597bca7b045b"
- // 实战营
- Shi_Zhan_Ying = "gh_9a865fcbd4bf"
- // 争霸赛
- Zheng_Ba_Sai = "gh_ccc3d7c5cbe0"
- // 隐私政策
- Yin_Si_Zheng_Ce = "https://jiuweiyun.cn/ys/index.html#/"
- // 用户协议
- Yong_Hu_Xie_Yi = "https://jiuweiyun.cn/yhxy/index.html#/"
- // 身份证图片拼接地址
- // 七牛云地址
- IdCard_Qi_Niu_URl = "https://qny.d0w.cc"
- // 公司地址
- IdCard_URl = "http://api.app.jiuweiyun.cn"
- // 公司官网
- Website_URL = "https://app.dwbs.jiuweiyun.cn/"
- //测试服务器
- // HOST_URL = "http://test.woaidakele.cn/api/"
- // SHARE_GOODS = "http://weidian.woaidakele.cn/web/user#pages/index/index?store_id=%s&goods_id=%s"
- // SHARE_ORDER = "http://weidian.woaidakele.cn/web/user#pages/scan-order/scan-order?order_no=%s"
- //正式服务器
- // HOST_URL = "http://app.jiuweiyun.cn/api/"
- // SHARE_GOODS = "http://weidian.jiuweiyun.cn/web/user#pages/index/index?store_id=%s&goods_id=%s"
- // SHARE_ORDER = "http://weidian.jiuweiyun.cn/web/user#pages/scan-order/scan-order?order_no=%s"
- switch (serverType) {
- case SERVER_TYPE_TEST:
- case SERVER_TYPE_PREVIEW:
- LOG_ENABLE = true
- BUGLY_ID = ""
- if (serverType == SERVER_TYPE_PREVIEW) {
- HOST_URL = "http://app.jiuweiyun.cn/api/"
- //SHARE_GOODS = "http://weidian.woaidakele.cn/web/user#pages/index/index?store_id=%s&goods_id=%s"
- //SHARE_ORDER = "http://weidian.woaidakele.cn/web/user#pages/scan-order/scan-order?order_no=%s"
- } else {
- HOST_URL = "http://app.jiuweiyun.cn/api/"
- //SHARE_GOODS = "http://weidian.woaidakele.cn/web/user#pages/index/index?store_id=%s&goods_id=%s"
- //SHARE_ORDER = "http://weidian.woaidakele.cn/web/user#pages/scan-order/scan-order?order_no=%s"
- }
- break
- case SERVER_TYPE_PRODUCT:
- LOG_ENABLE = false
- BUGLY_ID = ""
- HOST_URL = "http://app.jiuweiyun.cn/api/"
- //SHARE_GOODS = "http://weidian.woaidakele.cn/web/user#pages/index/index?store_id=%s&goods_id=%s"
- //SHARE_ORDER = "http://weidian.woaidakele.cn/web/user#pages/scan-order/scan-order?order_no=%s"
- break
- }
- }
|