1
1
apply plugin : ' com.android.application'
2
2
apply plugin : ' com.jakewharton.butterknife'
3
+ apply plugin : ' walle'
3
4
4
5
// 加载配置文件
5
6
final Properties properties = new Properties ()
@@ -59,11 +60,7 @@ android {
59
60
buildConfigField ' String' , ' WEIBO_APP_SECRET' , ' "' + weiboAppSecret + ' "'
60
61
buildConfigField ' String' , ' QQ_APP_ID' , ' "' + qqAppId + ' "'
61
62
buildConfigField ' String' , ' QQ_APP_SECRET' , ' "' + qqAppSecret + ' "'
62
-
63
-
64
- manifestPlaceholders = [
65
- UMENG_APPKEY : umengAppKey
66
- ]
63
+ buildConfigField ' String' , ' UMENG_APPKEY' , ' "' + umengAppKey + ' "'
67
64
68
65
ndk {
69
66
// fix bug #504 64位系统webView问题
@@ -77,83 +74,91 @@ android {
77
74
minifyEnabled false
78
75
debuggable true
79
76
// applicationIdSuffix '.debug'
80
- manifestPlaceholders = [
81
- UMENG_CHANNEL : ' DEV'
82
- ]
77
+ // manifestPlaceholders = [
78
+ // UMENG_CHANNEL: 'DEV'
79
+ // ]
83
80
signingConfig signingConfigs. release
84
81
}
85
82
release {
86
83
minifyEnabled false
87
84
signingConfig signingConfigs. release
88
85
proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
89
86
}
90
- beta {
91
- initWith release
92
- versionNameSuffix rootProject. hasProperty(" buildNum" ) ? ' .' + rootProject. property(" buildNum" ) + ' _beta' : ' '
93
- }
94
87
}
95
88
sourceSets { main { assets. srcDirs = [' src/main/assets' , ' src/main/assets/' ] } }
96
89
97
- // 渠道包定义,默认定义的名称就是渠道名称
98
- productFlavors {
99
- Dev {} // 测试
100
- // baidu {} // 百度手机助手
101
- yinyongbao {} // 应用宝
102
- // m360 {} // 360手机助手
103
- pp {} // PP助手
104
- meizu {} // 魅族
105
- xiaomi {} // 小米商店
106
- huawei {} // 华为商店
107
- official {} // 官方版本
108
- fir{} // fir内测平台版本
109
- }
90
+ // // 渠道包定义,默认定义的名称就是渠道名称
91
+ // productFlavors {
92
+ // Dev {} // 测试
93
+ // // baidu {} // 百度手机助手
94
+ // yinyongbao {} // 应用宝
95
+ // // m360 {} // 360手机助手
96
+ // pp {} // PP助手
97
+ // meizu {} // 魅族
98
+ // xiaomi {} // 小米商店
99
+ // huawei {} // 华为商店
100
+ // official {} // 官方版本
101
+ // fir{} // fir内测平台版本
102
+ // }
103
+ //
104
+ // // 批量渠道包值替换
105
+ // productFlavors.all { flavor ->
106
+ // flavor.manifestPlaceholders = [UMENG_CHANNEL: name, BUGLY_CHANNEL: name]
107
+ // }
110
108
111
- // 批量渠道包值替换
112
- productFlavors. all { flavor ->
113
- flavor. manifestPlaceholders = [UMENG_CHANNEL : name, BUGLY_CHANNEL : name]
114
- }
109
+ }
115
110
111
+ walle {
112
+ // 指定渠道包的输出路径
113
+ apkOutputFolder = new File (" ${ project.buildDir} /outputs/channels" )
114
+ // 定制渠道包的APK的文件名称
115
+ apkFileNameFormat = ' ${appName}-${buildType}-v${versionName}-${channel}.apk'
116
+ // 渠道配置文件
117
+ // channelFile = new File("${project.getProjectDir()}/config.json")
118
+ configFile = new File (" ${ project.getProjectDir()} /config.json" )
116
119
}
117
120
118
121
dependencies {
119
- compile fileTree(include : [ ' *.jar ' ], dir : ' libs ' )
120
- androidTestCompile (' com.android.support.test.espresso:espresso-core:2.2.2' , {
122
+ implementation fileTree(dir : ' libs ' , include : [ ' *.jar ' ] )
123
+ androidTestImplementation (' com.android.support.test.espresso:espresso-core:2.2.2' , {
121
124
exclude group : ' com.android.support' , module : ' support-annotations'
122
125
})
123
- testCompile ' junit:junit:4.12'
124
- compile " com.android.support:appcompat-v7:${ rootProject.ext.supportVersion} "
125
- compile " com.android.support:design:${ rootProject.ext.supportVersion} "
126
- compile " com.android.support:cardview-v7:${ rootProject.ext.supportVersion} "
127
- compile ' com.android.support:multidex:1.0.1'
128
- debugCompile project(path : ' :sdk' , configuration : ' debug' )
129
- betaCompile project(path : ' :sdk' , configuration : ' release' )
130
- releaseCompile project(path : ' :sdk' , configuration : ' release' )
131
- compile ' com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
132
- compile ' com.jakewharton:butterknife:8.8.1'
133
- annotationProcessor ' com.jakewharton:butterknife-compiler:8.8.1'
134
- compile ' in.srain.cube:ultra-ptr:1.0.11'
135
- compile ' com.github.raee:XRecyclerView:1.3.3'
136
- compile ' com.makeramen:roundedimageview:2.3.0'
137
- compile ' com.github.bumptech.glide:glide:4.0.0'
126
+ testImplementation ' junit:junit:4.12'
127
+ implementation ' com.android.support:multidex:1.0.2'
128
+
129
+ implementation project(' :sdk' )
130
+
131
+ annotationProcessor rootProject. ext. butterknifeCompiler
132
+ implementation rootProject. ext. appcompat
133
+ implementation rootProject. ext. design
134
+ implementation rootProject. ext. cardview
135
+ implementation rootProject. ext. butterknife
136
+ implementation rootProject. ext. rxjava
137
+
138
+ implementation ' com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
139
+ implementation ' in.srain.cube:ultra-ptr:1.0.11'
140
+ implementation ' com.github.raee:XRecyclerView:1.3.3'
141
+ implementation ' com.makeramen:roundedimageview:2.3.0'
142
+ implementation ' com.github.bumptech.glide:glide:4.0.0'
138
143
annotationProcessor ' com.github.bumptech.glide:compiler:4.0.0'
139
- compile ' com.umeng.analytics:analytics:6.1.3'
140
- compile ' org.greenrobot:eventbus:3.0.0 '
141
- compile ' me.imid.swipebacklayout.lib:library:1.0 .0'
142
- compile ' com.github.chrisbanes:PhotoView:2.1.2'
143
- debugCompile ' com.squareup.leakcanary:leakcanary-android:1.5.1'
144
- releaseCompile ' com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
145
- compile ' com.tencent.bugly:crashreport_upgrade:1.3.3 '
146
- compile ' eu.davidea:flexible-adapter:5.0.0-rc2'
144
+ implementation ' com.umeng.analytics:analytics:6.1.3'
145
+ implementation ' org.greenrobot:eventbus:3.1.1 '
146
+ implementation ' me.imid.swipebacklayout.lib:library:1.1 .0'
147
+ implementation ' com.github.chrisbanes:PhotoView:2.1.2'
148
+ debugImplementation ' com.squareup.leakcanary:leakcanary-android:1.5.1'
149
+ releaseImplementation ' com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
150
+
151
+ implementation ' eu.davidea:flexible-adapter:5.0.0-rc2'
147
152
// LeanCloud 基础包
148
- compile ' cn.leancloud.android:avoscloud-sdk:v4.4.3'
153
+ implementation ' cn.leancloud.android:avoscloud-sdk:v4.4.3'
149
154
// LeanCloud 用户反馈包
150
- compile ' cn.leancloud.android:avoscloud-feedback:v4.4.3@aar'
151
- compile ' io.reactivex.rxjava2:rxjava:2.1.0'
155
+ implementation ' cn.leancloud.android:avoscloud-feedback:v4.4.3@aar'
152
156
// 主题切换
153
- compile ' skin.support:skin-support:2.1.2'
154
- compile ' skin.support:skin-support-design:1.2.5'
155
- compile ' com.kyleduo.switchbutton:library:1.4.6'
156
- compile ' com.google.code.gson:gson:2.8.0'
157
+ implementation ' skin.support:skin-support:2.1.2'
158
+ implementation ' skin.support:skin-support-design:1.2.5'
159
+ implementation ' com.kyleduo.switchbutton:library:1.4.6'
160
+ implementation ' com.google.code.gson:gson:2.8.0'
161
+ implementation ' com.meituan.android.walle:library:1.1.6'
157
162
}
158
163
159
164
// 热更新
0 commit comments