123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307 |
- plugins {
- id 'com.android.application'
- }
- def releaseTime() {
- return new Date().format("yyyyMMddHHmmss", TimeZone.getTimeZone("CTT"))
- }
- android {
- compileSdkVersion 30
- defaultConfig {
- applicationId "com.edufound.reader"
- minSdkVersion 21 //>23导致无法直接签名
- targetSdkVersion 28
- versionCode 32
- versionName "3.2"
- flavorDimensions "versionCode"
- resConfigs "en", "zh-rCN"
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "2006"]//添加一个默认渠道号
- ndk {
- //(联想要arm64-v8a,不然无法上传,但是报错。)
- //京东方打入arm64-v8a会报错。(oppo手机也会报错)
- abiFilters "arm64-v8a"
- abiFilters "armeabi-v7a"
- abiFilters "armeabi"
- abiFilters "x86"
- // 添加x86必须添加x86_64
- abiFilters "x86_64"
- }
- multiDexEnabled true
- }
- signingConfigs {
- efunboxKey {
- keyAlias "edufound_key"
- keyPassword "edufound321"
- storeFile file("C:/Users/candy/Desktop/efunbox/edufound.keystore")
- storePassword "edufound123"
- v1SigningEnabled true
- v2SigningEnabled true
- }
- }
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- signingConfig signingConfigs.efunboxKey
- applicationVariants.all { variant ->
- variant.outputs.each { output ->
- def outputFile = output.outputFileName
- if (outputFile != null && output.outputFileName.endsWith('.apk')) {
- def fileName = "efunbox_reader_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 == ("3002")) {
- newoutputFile = "\\天猫精灵\\"
- } else if (channel == ("3003")) {
- newoutputFile = "\\小度音响\\"
- } else if (channel == ("2016")) {
- newoutputFile = "\\小爱音响\\"
- } else if (channel == ("3004")) {
- newoutputFile = "\\联想pad\\"
- } else if (channel == ("3007")) {
- newoutputFile = "\\京东方\\"
- } else if (channel == ("3008")) {
- newoutputFile = "\\华为pad联运\\"
- } else if (channel == ("3009")) {
- newoutputFile = "\\步步高\\"
- } else if (channel == ("3010")) {
- newoutputFile = "\\讯飞pad\\"
- }
- output.outputFileName = new File(newoutputFile, fileName)
- }
- }
- }
- }
- debug {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- signingConfig signingConfigs.efunboxKey
- zipAlignEnabled true
- }
- }
- packagingOptions {
- doNotStrip "*/armeabi/*.so"
- doNotStrip "*/armeabi-v7a/*.so"
- doNotStrip "*/arm64-v8a/*.so"
- doNotStrip "*/x86/*.so"
- doNotStrip "*/x86_64/*.so"
- }
- sourceSets {
- main {
- jniLibs.srcDirs = ['libs']
- res.srcDirs = [
- 'src/main/res', //默认只有这一个路径
- 'src/fragmentRecommend', //首页推荐
- 'src/fragmentUser',//首页我的
- 'src/activityLoginAlert',//登录弹窗
- 'src/exception',//异常弹窗
- 'src/testimg',//测试图片
- ]
- }
- }
- productFlavors {
- //义方
- channel_efunbox {
- signingConfig signingConfigs.efunboxKey
- manifestPlaceholders = [
- appCode: "3006",
- appIcon: "@drawable/icon",
- ]
- }
- //百度(小度音响)
- channel_baidu {
- signingConfig signingConfigs.efunboxKey
- manifestPlaceholders = [
- appCode: "3003",
- appIcon: "@drawable/icon",
- ]
- }
- //天猫精灵
- channel_tmail {
- signingConfig signingConfigs.efunboxKey
- manifestPlaceholders = [
- appCode: "3002",
- appIcon: "@drawable/icon",
- ]
- }
- //小爱音响
- channel_xayx {
- applicationIdSuffix ".xiaoai"
- signingConfig signingConfigs.efunboxKey
- manifestPlaceholders = [
- appCode: "2016",
- appIcon: "@drawable/icon",
- ]
- }
- //联想渠道
- channel_lenovo {
- signingConfig signingConfigs.efunboxKey
- manifestPlaceholders = [
- appCode: "3004",
- appIcon: "@drawable/icon",
- ]
- }
- //京东方
- channel_jingdongfang {
- signingConfig signingConfigs.efunboxKey
- manifestPlaceholders = [
- appCode: "3007",
- appIcon: "@drawable/icon",
- ]
- }
- //华为Pad联运
- channel_huawei_lianyun {
- apply plugin: "com.huawei.agconnect"
- applicationIdSuffix ".huawei"
- signingConfig signingConfigs.efunboxKey
- manifestPlaceholders = [
- appCode: "3008",
- appIcon: "@drawable/icon",
- ]
- }
- //步步高pad
- channel_bubugao {
- signingConfig signingConfigs.efunboxKey
- manifestPlaceholders = [
- appCode: "3009",
- appIcon: "@drawable/icon",
- ]
- }
- //讯飞pad
- channel_xunfei {
- signingConfig signingConfigs.efunboxKey
- manifestPlaceholders = [
- appCode: "3010",
- appIcon: "@drawable/icon",
- ]
- }
- }
- productFlavors.all {
- flavor -> flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: manifestPlaceholders.appCode, icon: manifestPlaceholders.appIcon]
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- aaptOptions {
- additionalParameters = ["--warn-manifest-validation"]
- }
- }
- dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
- implementation 'androidx.appcompat:appcompat:1.0.0'
- implementation 'com.github.bumptech.glide:glide:4.12.0'
- annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
- implementation 'jp.wasabeef:glide-transformations:4.3.0'
- implementation('com.zhousf.lib:okhttp3:2.9.9') {
- exclude(module: 'support-annotations')
- exclude(module: 'gson')
- }
- //gson
- implementation 'com.google.code.gson:gson:2.8.9'
- //logger
- implementation 'com.orhanobut:logger:2.2.0'
- //mmkv
- implementation 'com.tencent:mmkv:1.2.11'
- implementation 'com.uber.autodispose2:autodispose:2.0.0'
- implementation 'com.uber.autodispose2:autodispose-android:2.0.0'
- implementation 'com.uber.autodispose2:autodispose-lifecycle:2.0.0'
- implementation 'com.uber.autodispose2:autodispose-androidx-lifecycle:2.0.0'
- // 友盟基础组件库(所有友盟业务SDK都依赖基础组件库)
- implementation 'com.umeng.umsdk:common:9.4.4'// (必选)
- implementation 'com.umeng.umsdk:asms:1.4.1'// asms包依赖必选
- // required, enough for most devices.
- implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
- // ExoPlayer as IMediaPlayer: optional, experimental
- implementation 'tv.danmaku.ijk.media:ijkplayer-exo:0.8.8'
- //JZ播放器
- implementation 'cn.jzvd:jiaozivideoplayer:7.7.0'
- //recyclerview
- implementation 'androidx.recyclerview:recyclerview:1.1.0'
- //驰声
- implementation 'io.github.ChivoxSupport:vox-sdk:2.2.23+2.0.8.1'
- //rxBind
- implementation 'com.jakewharton.rxbinding4:rxbinding:4.0.0'
- implementation 'com.trello.rxlifecycle4:rxlifecycle:4.0.2'
- implementation 'com.trello.rxlifecycle4:rxlifecycle-android:4.0.2'
- implementation "androidx.constraintlayout:constraintlayout:2.1.1"
- // To use constraintlayout in compose
- implementation "androidx.constraintlayout:constraintlayout-compose:1.0.0-rc01"
- //解除Android P 反射机制
- implementation 'com.github.tiann:FreeReflection:3.1.0'
- //百度(小度音响SDK)
- implementation 'com.baidu.duer.botsdk:bot-sdk-android:1.56.1'
- // 3rd Party
- implementation "com.alibaba:fastjson:${FASTJSON_VERSION}"
- //zxing
- implementation 'com.google.zxing:android-core:3.3.0'
- implementation 'com.google.zxing:core:3.3.2'
- implementation files('libs/gcs-authservice-1.0.0.21.jar')
- implementation files('libs/registry-api-1.1.16-20201203.085134-3.jar')
- implementation files('libs/aranger.jar')
- //小米音响
- implementation files('libs/thirdparty-payment-sdk-2.1.1-20200527.030546-1.jar')
- //超长图imageview
- implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.5.0'
- // 1. Use Guava in your implementation only:
- implementation("com.google.guava:guava:31.1-jre")
- implementation("com.google.guava:guava:31.1-android")
- //FloatingViewLib(https://github.com/UFreedom/FloatingView/blob/master/README_CN.md)
- implementation 'com.ufreedom.uikit:FloatingViewLib:1.0.2'
- //SimpleRatingBar(https://github.com/williamyyu/SimpleRatingBar)
- implementation 'com.github.ome450901:SimpleRatingBar:1.4.0'
- //华为sdk
- implementation 'com.huawei.hms:hwid:6.7.0.300'
- implementation 'com.huawei.hms:hmscoreinstaller:6.6.0.300'
- implementation 'com.huawei.hms:iap:6.4.0.301'
- implementation 'com.huawei.hms:appservice:6.8.0.300'
- implementation 'com.huawei.hms:hianalytics:6.9.0.301'
- //全局共用一个点击时间
- implementation 'cc.taylorzhang:single-click:1.1.0'
- }
- agcp {
- manifest false
- }
|