|
@@ -2,6 +2,10 @@ import org.apache.tools.ant.taskdefs.condition.Os
|
|
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
+def releaseTime() {
|
|
|
+ return new Date().format("yyyyMMdd", TimeZone.getTimeZone("UTC"))
|
|
|
+}
|
|
|
+
|
|
|
android {
|
|
|
compileSdkVersion PROP_COMPILE_SDK_VERSION.toInteger()
|
|
|
buildToolsVersion PROP_BUILD_TOOLS_VERSION
|
|
@@ -11,7 +15,9 @@ android {
|
|
|
minSdkVersion PROP_MIN_SDK_VERSION
|
|
|
targetSdkVersion PROP_TARGET_SDK_VERSION
|
|
|
versionCode 91000
|
|
|
- versionName "9.1"
|
|
|
+ versionName "9.1.0.0.0"
|
|
|
+ flavorDimensions "versionCode"
|
|
|
+ manifestPlaceholders = [UMENG_CHANNEL_VALUE: "2006"]//添加一个默认渠道号
|
|
|
ndk {
|
|
|
abiFilters 'armeabi-v7a'
|
|
|
}
|
|
@@ -56,7 +62,6 @@ android {
|
|
|
}
|
|
|
|
|
|
signingConfigs {
|
|
|
-
|
|
|
release {
|
|
|
if (project.hasProperty("RELEASE_STORE_FILE")) {
|
|
|
storeFile file(RELEASE_STORE_FILE)
|
|
@@ -74,11 +79,45 @@ android {
|
|
|
renderscriptDebuggable false
|
|
|
minifyEnabled true
|
|
|
shrinkResources true
|
|
|
+ zipAlignEnabled true
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
if (project.hasProperty("RELEASE_STORE_FILE")) {
|
|
|
signingConfig signingConfigs.release
|
|
|
}
|
|
|
|
|
|
+ applicationVariants.all { variant ->
|
|
|
+ variant.outputs.each { output ->
|
|
|
+ def outputFile = output.outputFileName
|
|
|
+ if (outputFile != null && output.outputFileName.endsWith('.apk')) {
|
|
|
+ def fileName = "efunbox_tv_v${defaultConfig.versionCode}_${releaseTime()}_${variant.productFlavors[0].manifestPlaceholders.UMENG_CHANNEL_VALUE}_r.apk"
|
|
|
+ def channel = variant.productFlavors[0].manifestPlaceholders.UMENG_CHANNEL_VALUE;
|
|
|
+ def newoutputFile = "";
|
|
|
+ if (channel == ("2006")) {
|
|
|
+ newoutputFile = "\\义方\\"
|
|
|
+ } else if (channel == ("2001")) {
|
|
|
+ newoutputFile = "\\应用宝\\"
|
|
|
+ } else if (channel == ("2002")) {
|
|
|
+ newoutputFile = "\\360应用市场\\"
|
|
|
+ } else if (channel == ("2003")) {
|
|
|
+ newoutputFile = "\\百度手机助手\\"
|
|
|
+ } else if (channel == ("2008")) {
|
|
|
+ newoutputFile = "\\小米\\"
|
|
|
+ } else if (channel == ("2012")) {
|
|
|
+ newoutputFile = "\\华科\\"
|
|
|
+ } else if (channel == ("2013")) {
|
|
|
+ newoutputFile = "\\步步高\\"
|
|
|
+ } else if (channel == ("2015")) {
|
|
|
+ newoutputFile = "\\状元才子\\"
|
|
|
+ } else if (channel == ("2011")) {
|
|
|
+ newoutputFile = "\\广西优学\\"
|
|
|
+ } else if (channel == ("2007")) {
|
|
|
+ newoutputFile = "\\vivo\\"
|
|
|
+ }
|
|
|
+ output.outputFileName = new File(newoutputFile, fileName)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
externalNativeBuild {
|
|
|
ndkBuild {
|
|
|
arguments 'NDK_DEBUG=0'
|
|
@@ -97,6 +136,101 @@ android {
|
|
|
// }
|
|
|
// }
|
|
|
}
|
|
|
+ productFlavors {
|
|
|
+ //义方
|
|
|
+ channel_efunbox {
|
|
|
+ signingConfig signingConfigs.release
|
|
|
+ manifestPlaceholders = [
|
|
|
+ appCode: "2006",
|
|
|
+ appIcon: "@drawable/icon",
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ //应用宝
|
|
|
+ channel_yyb {
|
|
|
+ signingConfig signingConfigs.release
|
|
|
+ manifestPlaceholders = [
|
|
|
+ appCode: "2001",
|
|
|
+ appIcon: "@drawable/icon",
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ //360应用市场
|
|
|
+ channel_360 {
|
|
|
+ signingConfig signingConfigs.release
|
|
|
+ manifestPlaceholders = [
|
|
|
+ appCode: "2002",
|
|
|
+ appIcon: "@drawable/icon",
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ //百度手机助手
|
|
|
+ channel_bdsjzs {
|
|
|
+ signingConfig signingConfigs.release
|
|
|
+ manifestPlaceholders = [
|
|
|
+ appCode: "2003",
|
|
|
+ appIcon: "@drawable/icon",
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ //vivo
|
|
|
+ channel_vivo {
|
|
|
+ signingConfig signingConfigs.release
|
|
|
+ manifestPlaceholders = [
|
|
|
+ appCode: "2007",
|
|
|
+ appIcon: "@drawable/icon",
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ //小米
|
|
|
+ channel_xiaomi {
|
|
|
+ signingConfig signingConfigs.release
|
|
|
+ manifestPlaceholders = [
|
|
|
+ appCode: "2008",
|
|
|
+ appIcon: "@drawable/icon",
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ //华科
|
|
|
+ channel_huake {
|
|
|
+ signingConfig signingConfigs.release
|
|
|
+ manifestPlaceholders = [
|
|
|
+ appCode: "2012",
|
|
|
+ appIcon: "@drawable/icon",
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ //步步高
|
|
|
+ channel_bubugao {
|
|
|
+ signingConfig signingConfigs.release
|
|
|
+ manifestPlaceholders = [
|
|
|
+ appCode: "2013",
|
|
|
+ appIcon: "@drawable/icon",
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ //状元才子
|
|
|
+ channel_zhuangyuancaizi {
|
|
|
+ signingConfig signingConfigs.release
|
|
|
+ manifestPlaceholders = [
|
|
|
+ appCode: "2015",
|
|
|
+ appIcon: "@drawable/icon",
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ //广西优学
|
|
|
+ channel_guangxiyouxue {
|
|
|
+ signingConfig signingConfigs.release
|
|
|
+ manifestPlaceholders = [
|
|
|
+ appCode: "2011",
|
|
|
+ appIcon: "@drawable/icon",
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ //字节跳动
|
|
|
+ channel_bytedance {
|
|
|
+ signingConfig signingConfigs.release
|
|
|
+ manifestPlaceholders = [
|
|
|
+ appCode: "2020",
|
|
|
+ appIcon: "@drawable/icon",
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ productFlavors.all {
|
|
|
+ flavor -> flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: manifestPlaceholders.appCode, icon: manifestPlaceholders.appIcon]
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
android.applicationVariants.all { variant ->
|
|
@@ -127,6 +261,7 @@ android.applicationVariants.all { variant ->
|
|
|
into outputDir
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
dependencies {
|
|
@@ -140,4 +275,29 @@ dependencies {
|
|
|
implementation "com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+"
|
|
|
implementation project(':libcocos2dx')
|
|
|
|
|
|
-}
|
|
|
+
|
|
|
+ // 友盟基础组件库(所有友盟业务SDK都依赖基础组件库)
|
|
|
+ implementation 'com.umeng.umsdk:common:9.4.4'// (必选)
|
|
|
+ implementation 'com.umeng.umsdk:asms:1.4.1'// asms包依赖必选
|
|
|
+
|
|
|
+// implementation 'com.umeng.umsdk:abtest:1.0.0'//使用U-App中ABTest能力,可选
|
|
|
+
|
|
|
+ //友盟Push依赖
|
|
|
+ api 'com.umeng.umsdk:push:6.4.5'
|
|
|
+ //友盟P厂商推送渠道(小米)
|
|
|
+ api 'com.umeng.umsdk:xiaomi-umengaccs:1.2.6'
|
|
|
+ implementation 'com.umeng.umsdk:xiaomi-push:4.8.1'
|
|
|
+
|
|
|
+ //友盟P厂商推送(华为)
|
|
|
+ api 'com.umeng.umsdk:huawei-umengaccs:1.3.5'
|
|
|
+ api 'com.huawei.hms:push:5.3.0.304'
|
|
|
+ //友盟厂商推送(魅族)
|
|
|
+ api 'com.umeng.umsdk:meizu-umengaccs:1.1.5'
|
|
|
+ api 'com.umeng.umsdk:meizu-push:4.1.4'
|
|
|
+ //友盟厂商推送(OPPO)
|
|
|
+ api 'com.umeng.umsdk:oppo-umengaccs:1.0.7-fix'
|
|
|
+ implementation 'com.umeng.umsdk:oppo-push:2.1.0'
|
|
|
+ //友盟厂商(ViVo)
|
|
|
+ api 'com.umeng.umsdk:vivo-umengaccs:1.1.5'
|
|
|
+ implementation 'com.umeng.umsdk:vivo-push:3.0.0.3'
|
|
|
+}
|