plugins { id 'com.android.application' } def releaseTime() { return new Date().format("yyyyMMddHHmmss", TimeZone.getTimeZone("UTC")) } android { compileSdkVersion 30 buildToolsVersion "30.0.3" defaultConfig { applicationId "com.edufound.reader" minSdkVersion 21 targetSdkVersion 30 versionCode 7 versionName "1.7" flavorDimensions "versionCode" manifestPlaceholders = [UMENG_CHANNEL_VALUE: "2006"]//添加一个默认渠道号 testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' ndk { abiFilters "armeabi-v7a" } } signingConfigs { efunbox { keyAlias "edufound_key" keyPassword "edufound321" storeFile file("C:/Users/candy/Desktop/efunbox/edufound.keystore") storePassword "edufound123" } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' signingConfig signingConfigs.efunbox zipAlignEnabled true 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 = "\\义方\\" } output.outputFileName = new File(newoutputFile, fileName) } } } } debug { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' signingConfig signingConfigs.efunbox zipAlignEnabled true } } sourceSets { main { jniLibs.srcDirs = ['libs'] res.srcDirs = [ 'src/main/res', //默认只有这一个路径 'src/fragmentRecommend', //首页推荐 'src/fragmentUser',//首页我的 'src/activityLoginAlert',//登录弹窗 'src/exception'//异常弹窗 ] } } productFlavors { //义方 channel_efunbox { signingConfig signingConfigs.efunbox manifestPlaceholders = [ appCode: "3006", appIcon: "@drawable/icon", ] } //百度(小度音响) channel_baidu { signingConfig signingConfigs.efunbox manifestPlaceholders = [ appCode: "3003", appIcon: "@drawable/icon", ] } //天猫精灵 channel_tmail { signingConfig signingConfigs.efunbox manifestPlaceholders = [ appCode: "3002", 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') }