Commit 2d1ff1d0 by chengfengpiaopiao

Walle打包配置

parent 82c291be
apply plugin: 'com.android.application'
apply plugin: 'walle' //walle
def customPropsFile = file("buildcustom.properties");
Properties customProps = new Properties()
......@@ -38,17 +39,17 @@ android {
//多渠道配置
productFlavors {
wandoujia {}
baidu {}
c360 {}
uc {}
xiaomi {}
huawei {}
productFlavors.all { flavor ->
flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name]
}
}
// productFlavors {
// wandoujia {}
// baidu {}
// c360 {}
// uc {}
// xiaomi {}
// huawei {}
// productFlavors.all { flavor ->
// flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name]
// }
// }
buildTypes {
release {
......@@ -68,15 +69,15 @@ android {
}
}
android.applicationVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
def channelName = variant.productFlavors[0].name;
//这里修改文件名
def fileName = "duobaojingcai_${channelName}_v${defaultConfig.versionName}${suffixName[networkType]}.apk"
output.outputFile = new File(outputFile.parent, fileName)
}
}
// android.applicationVariants.all { variant ->
// variant.outputs.each { output ->
// def outputFile = output.outputFile
// def channelName = variant.productFlavors[0].name;
// //这里修改文件名
// def fileName = "duobaojingcai_${channelName}_v${defaultConfig.versionName}${suffixName[networkType]}.apk"
// output.outputFile = new File(outputFile.parent, fileName)
// }
// }
}
......@@ -103,4 +104,6 @@ dependencies {
compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
compile 'com.umeng.analytics:analytics:latest.integration'
compile 'com.meituan.android.walle:library:1.1.5' //walle
}
......@@ -24,9 +24,9 @@
<!--58c25576c895767d61000ec7 -->
<meta-data
android:name="UMENG_APPKEY"
android:value="5a0abb218f4a9d05b0000036" />
<!--<meta-data-->
<!--android:name="UMENG_APPKEY"-->
<!--android:value="5a0abb218f4a9d05b0000036" />-->
<!--&lt;!&ndash;<meta-data&ndash;&gt;-->
<!--&lt;!&ndash;android:name="UMENG_MESSAGE_SECRET"&ndash;&gt;-->
......
......@@ -7,6 +7,7 @@ import android.content.pm.PackageManager;
import android.util.Log;
import com.maile.jingcai.util.DrawUtil;
import com.meituan.android.walle.WalleChannelReader;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
import com.umeng.analytics.MobclickAgent;
......@@ -26,8 +27,10 @@ public class BaseApplication extends Application{
DrawUtil.resetDensity(this);
regToWx();
// 场景类型设置接口,设置为普通统计场景类型
// MobclickAgent.setScenarioType(this, MobclickAgent.EScenarioType.E_UM_NORMAL);
// MobclickAgent.startWithConfigure(new MobclickAgent.UMAnalyticsConfig(getApplicationContext(),"5a0abb218f4a9d05b0000036",getChannel(getApplicationContext(),"UMENG_CHANNEL")));
String channel = WalleChannelReader.getChannel(this.getApplicationContext());
MobclickAgent.setScenarioType(this, MobclickAgent.EScenarioType.E_UM_NORMAL);
// MobclickAgent.startWithConfigure(new MobclickAgent.UMAnalyticsConfig(getApplicationContext(),"5a0ac0f58f4a9d05b0000093",getChannel(getApplicationContext(),"UMENG_CHANNEL")));
MobclickAgent.startWithConfigure(new MobclickAgent.UMAnalyticsConfig(getApplicationContext(),"5a0c065af43e4850f70000ef",channel));
// String appkey = "";
// String channal = "";
......@@ -41,6 +44,7 @@ public class BaseApplication extends Application{
//
Log.i("tangwen", "Application: 获取渠道包信息 " + getChannel(getApplicationContext(),"UMENG_CHANNEL"));
Log.i("tangwen", "Application: 获取渠道包信息 : " + channel);
}
......
......@@ -6,7 +6,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.meituan.android.walle:plugin:1.1.5' //walle
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment