-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
build.gradle
69 lines (64 loc) · 2.49 KB
/
build.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
65
66
67
68
69
/*
* Copyright (c) 2016-present 贵州纳雍穿青人李裕江<[email protected]>
*
* The software is licensed under the Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
* PURPOSE.
* See the Mulan PSL v2 for more details.
*/
apply from: "${rootDir}/gradle/app.gradle"
dependencies {
implementation androidxLibrary.multidex
implementation androidxLibrary.appcompat
implementation library.material
implementation project(':Common')
implementation project(':WheelView')
implementation project(':WheelPicker')
implementation project(':AddressPicker')
implementation project(':ColorPicker')
implementation project(':FilePicker')
implementation project(':CalendarPicker')
implementation project(':ImagePicker')
debugRuntimeOnly library.orhanobut_logger
debugRuntimeOnly library.xcrash
compileOnly library.xcrash
}
android {
defaultConfig {
//应用的实际包名
applicationId "com.github.gzuliyujiang.demo.picker"
// 配合 productFlavors 节点按不同维度打包
flavorDimensions "MODE"
// 修改 AndroidManifest.xml 里的变量,占位值无法覆盖的坑可参阅 https://www.jianshu.com/p/1d5271c2c366
manifestPlaceholders = [
MY_CHANNEL: "unknown",
]
}
// 打包维度列表,会按维度名字母顺序执行,最终发布的具体渠道包的生成可以借助360加固等工具
productFlavors {
// 发布模式/正式环境
pub {
dimension "MODE"
// 服务端接口地址
buildConfigField "String", "API_BASE_URL", '"https://api.example.com"'
// 修改 AndroidManifest.xml 里的变量
manifestPlaceholders = [
MY_CHANNEL: "publisher-default",
]
}
// 开发模式/测试环境
dev {
dimension "MODE"
// 服务端接口地址
buildConfigField "String", "API_BASE_URL", '"https://test.example.com"'
// 修改 AndroidManifest.xml 里的变量
manifestPlaceholders = [
MY_CHANNEL: "developer-default",
]
}
}
}