/
build.gradle
125 lines (108 loc) · 4.17 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
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
apply plugin: 'com.android.application'
apply plugin: 'com.xuexiang.xaop' //引用xaop插件
android {
compileSdkVersion build_versions.target_sdk
buildToolsVersion build_versions.build_tools
defaultConfig {
applicationId "com.xuexiang.pushdemo"
minSdkVersion 19
targetSdkVersion build_versions.target_sdk
versionCode 2
versionName "1.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
ndk {
// 设置支持的SO库
abiFilters 'armeabi', 'x86' //,'armeabi-v7a', 'x86', 'x86_64', 'arm64-v8a','mips','mips64'
manifestPlaceholders = [
XG_ACCESS_ID:"2100343759",
XG_ACCESS_KEY:"A7Q26I8SH7LV",
]
}
}
signingConfigs {
if (isNeedPackage.toBoolean()) {
release {
storeFile file(app_release.storeFile)
storePassword app_release.storePassword
keyAlias app_release.keyAlias
keyPassword app_release.keyPassword
}
}
debug {
storeFile file("./debug.jks")
storePassword "123456"
keyAlias "debug"
keyPassword "123456"
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (isNeedPackage.toBoolean()) {
signingConfig signingConfigs.release
}
}
debug {
debuggable true
minifyEnabled false
signingConfig signingConfigs.debug
}
}
if (isNeedPackage.toBoolean()) {
applicationVariants.all { variant ->
variant.outputs.all {
if (variant.buildType.name.equals('release')) {
outputFileName = "xpushdemo_${defaultConfig.versionName}.apk"
}
}
}
}
lintOptions {
abortOnError false
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation deps.support.app_compat
testImplementation deps.junit
androidTestImplementation deps.runner
androidTestImplementation deps.espresso.core
implementation 'com.android.support:multidex:1.0.3'
//工具类
implementation 'com.github.xuexiangjys.XUtil:xutil-core:1.1.6'
implementation 'com.github.xuexiangjys.XUtil:xutil-sub:1.1.6'
//切片
implementation 'com.github.xuexiangjys.XAOP:xaop-runtime:1.0.5' //添加依赖
//XPage
implementation 'com.github.xuexiangjys.XPage:xpage-lib:2.2.6'
annotationProcessor 'com.github.xuexiangjys.XPage:xpage-compiler:2.2.6'
//ButterKnife的sdk
implementation deps.butterknife.runtime
annotationProcessor deps.butterknife.compiler
//如果开启了内存泄漏监测leak,就需要加上这个依赖
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.3'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.3'
testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.3'
//RxJava
implementation deps.rxjava2
implementation deps.rx_android
implementation 'com.github.xuexiangjys:RxUtil2:1.1.5'
implementation project(path: ':keeplive')
implementation project(path: ':xpush-core')
implementation project(path: ':xpush-jpush')
implementation project(path: ':xpush-umeng')
implementation project(path: ':xpush-huawei')
implementation project(path: ':xpush-xiaomi')
implementation project(path: ':xpush-xg')
// //XPush核心库(必须添加)
// implementation 'com.github.xuexiangjys.XPush:xpush-core:1.0.0'
// //XPush保活库(可选)
// implementation 'com.github.xuexiangjys.XPush:keeplive:1.0.0'
// //XPush三方推送集成库(选择性添加)
// implementation 'com.github.xuexiangjys.XPush:xpush-jpush:1.0.0'
// implementation 'com.github.xuexiangjys.XPush:xpush-umeng:1.0.0'
// implementation 'com.github.xuexiangjys.XPush:xpush-huawei:1.0.0'
// implementation 'com.github.xuexiangjys.XPush:xpush-xiaomi:1.0.0'
}