build.gradle
8.85 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
plugins {
id 'com.android.application'
id 'io.objectbox'
}
android {
compileSdkVersion 29
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.whaty.nafmii"
minSdkVersion 24
targetSdkVersion 29
versionCode 101
versionName "2.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
flavorDimensions "versionCode"
buildConfigField "String", "ASSETS_DIST_DIR", "\"\""
buildConfigField "String", "API_HOST", "\"http://10.10.81.189/nafmii/app/\""
buildConfigField "String", "IMG_API", "\"http://10.10.81.172/group1/\""
buildConfigField "String", "WX_APPID", "\"wx06a3b88ecb27f0d8\""
buildConfigField "String", "QQ_APPID", "\"101975384\""
buildConfigField "String", "ONLINE_URL", "\"http://10.10.81.189/h5/\""
buildConfigField "String", "MODULE_LEARN", "\"http://ycjytest.cfae.cn/sites/bank/mb/index.html\""
buildConfigField "boolean", "SHOW_INPUT", "true"
buildConfigField "boolean", "ONLINE", "false"
ndk {
abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
}
javaCompileOptions {
annotationProcessorOptions {
arguments = [
"objectbox.modelPath" : "$projectDir\\schemas\\objectbox.json".toString(),
"objectbox.myObjectBoxPackage": "com.polysoft.nafmii.database"
]
}
}
manifestPlaceholders = [
JPUSH_PKGNAME: applicationId,
JPUSH_APPKEY : "ef86f246857d981193987dee",//值来自开发者平台取得的AppKey
JPUSH_CHANNEL: "default_developer",
//meizu_config_start
// MEIZU_APPKEY : "MZ-魅族的APPKEY",
// MEIZU_APPID : "MZ-魅族的APPID",
//meizu_config_end
//xiaomi_config_start
XIAOMI_APPID : "MI-小米的APPID",
XIAOMI_APPKEY: "MI-小米的APPKEY",
//xiaomi_config_end
//oppo_config_start
// OPPO_APPKEY : "OP-oppo的APPKEY",
// OPPO_APPID : "OP-oppo的APPID",
// OPPO_APPSECRET: "OP-oppo的APPSECRET",
// //oppo_config_end
// //vivo_config_start
// VIVO_APPKEY : "vivo的APPKEY",
// VIVO_APPID : "vivo的APPID",
//vivo_config_end
]
}
productFlavors {
onLine {
buildConfigField "boolean", "ONLINE", "true"
}
offLine {
buildConfigField "boolean", "ONLINE", "false"
}
}
signingConfigs {
// debug {
// storeFile file('../nafmii.keystore')
// storePassword 'whaty123'
// keyPassword 'whaty123'
// keyAlias 'whaty'
// }
release {
storeFile file('../nafmii.keystore')
storePassword 'whaty123'
keyAlias 'whaty'
keyPassword 'whaty123'
}
}
buildTypes {
release {
minifyEnabled true //是否混淆
zipAlignEnabled true //是否设置zip对齐优化
shrinkResources true // 移除无用的resource文件
resValue "string", "app_name", "NAFMII之窗"
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField "boolean", "SHOW_INPUT", "false"
buildConfigField "String", "H5_VERSION", "\"1.0.0\""
}
debug {
signingConfig signingConfigs.release
}
pre { // 模拟
debuggable true
minifyEnabled true //是否混淆
zipAlignEnabled true //是否设置zip对齐优化
shrinkResources true
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
resValue "string", "app_name", "NAFMII之窗-qp"
applicationIdSuffix "qp"
buildConfigField "String", "H5_VERSION", "\"1.0.0\""
buildConfigField "String", "ASSETS_DIST_DIR", "\"pre\""
buildConfigField "String", "WX_APPID", "\"wx0c80bdc32795951b\""
buildConfigField "String", "QQ_APPID", "\"101976821\""
buildConfigField "String", "API_HOST", "\"https://nafmiiapppre.cfae.cn/nafmii/app/\""
buildConfigField "String", "IMG_API", "\"https://nafmiiapppre.cfae.cn/file/\""
buildConfigField "String", "ONLINE_URL", "\"https://nafmiiapppre.cfae.cn/h5/\""
buildConfigField "String", "MODULE_LEARN", "\"http://ycjyconfirm.cfae.cn/sites/bank/mb/index.html\""
manifestPlaceholders = [
JPUSH_PKGNAME: "com.whaty.nafmii.qp",
JPUSH_APPKEY : "63ca64e8348aabe37ee7ae2b",//值来自开发者平台取得的AppKey
JPUSH_CHANNEL: "default_developer"
]
}
uat { // 测试
debuggable true
minifyEnabled false
signingConfig signingConfigs.release
resValue "string", "app_name", "NAFMII之窗-uat"
applicationIdSuffix "uat"
buildConfigField "String", "H5_VERSION", "\"1.0.0\""
buildConfigField "String", "ASSETS_DIST_DIR", "\"uat\""
buildConfigField "String", "WX_APPID", "\"wxb9dd952e6522ef31\""
buildConfigField "String", "QQ_APPID", "\"101975384\""
buildConfigField "String", "API_HOST", "\"https://nafmiiappuat.cfae.cn/nafmii/app/\""
buildConfigField "String", "IMG_API", "\"https://nafmiiappuat.cfae.cn/file/\""
buildConfigField "String", "ONLINE_URL", "\"https://nafmiiappuat.cfae.cn/h5/\""
buildConfigField "String", "MODULE_LEARN", "\"http://ycjytest.cfae.cn/sites/bank/mb/index.html\""
manifestPlaceholders = [
JPUSH_PKGNAME: "com.whaty.nafmii.uat",
JPUSH_APPKEY : "506f65662d2d2b010159f606",//值来自开发者平台取得的AppKey
JPUSH_CHANNEL: "default_developer"
]
}
dev {
debuggable true
minifyEnabled false
signingConfig signingConfigs.release
resValue "string", "app_name", "NAFMII之窗-dev"
applicationIdSuffix "dev"
buildConfigField "String", "H5_VERSION", "\"1.0.0\""
buildConfigField "String", "ASSETS_DIST_DIR", "\"dev\""
buildConfigField "String", "WX_APPID", "\"wx06a3b88ecb27f0d8\""
buildConfigField "String", "QQ_APPID", "\"101975384\""
buildConfigField "String", "API_HOST", "\"http://10.10.81.189/nafmii/app/\""
buildConfigField "String", "IMG_API", "\"http://10.10.81.172/group1/\""
buildConfigField "String", "ONLINE_URL", "\"http://10.10.81.189/h5/\""
buildConfigField "String", "MODULE_LEARN", "\"http://bank.lms.webtrn.cn/sites/bank/mb/index.html\""
manifestPlaceholders = [
JPUSH_PKGNAME: "com.whaty.nafmii.dev",
JPUSH_APPKEY : "5e402f8bcad079affc7da490",//值来自开发者平台取得的AppKey
JPUSH_CHANNEL: "default_developer"
]
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
ndkVersion '20.0.5594570'
}
dependencies {
implementation 'androidx.wear:wear:1.0.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'ren.yale.android:cachewebviewlib:2.1.8'
implementation 'com.alibaba:fastjson:1.2.75'
implementation 'com.wang.avi:library:2.1.3'
implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.7.0'
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.2'
implementation 'com.github.bumptech.glide:glide:4.12.0'
implementation 'org.greenrobot:eventbus:3.2.0'
implementation 'cn.jiguang.sdk:jpush:4.3.0' // 此处以JPush 4.3.0 版本为例。
implementation 'cn.jiguang.sdk:jcore:2.9.0' // 此处以JCore 2.9.0 版本为例。
implementation "io.objectbox:objectbox-android:$objectboxVersion"
annotationProcessor "io.objectbox:objectbox-processor:$objectboxVersion"
implementation 'me.jessyan:autosize:1.2.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
compileOnly 'com.google.android.wearable:wearable:2.7.0'
}