-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigs.gradle
64 lines (58 loc) · 1.88 KB
/
configs.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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 = "63dd0bd7ba6a5259c4f948d9"
// QQ AppId
QQ_APP_ID = "1112196001"
// QQ Secret
QQ_APP_SECRET = "m8R0Ht4pqi6pwFAZ"
// 微信 AppId
WX_APP_ID = "wxdf96f973a6d3be68"
// 微信 Secret
WX_APP_SECRET = "213a5a44e83027a5f0e22cd626bc0476"
//好单库APpKey
HDK_APP_KEY = "6A1C5D434A43"
//淘宝联盟PID
TBLM_PID = "mm_111203980_2833850012_115618900286"
//好单库请求地址
hak_baseUrl = "http://v2.api.haodanku.com/"
switch (serverType) {
case SERVER_TYPE_TEST:
LOG_ENABLE = true
BUGLY_ID = "1ff4582555"
HOST_URL = "http://192.168.0.196:20236/"
//存储桶
BUCKET_NAME = "ttsq-dev-1316145532"
break
case SERVER_TYPE_PRODUCT:
LOG_ENABLE = false
BUGLY_ID = "1ff4582555"
HOST_URL = "https://admin.ttsq.dxmwl.com/prod-api/"
//存储桶
BUCKET_NAME = "ttsq-1316145532"
break
}
}