123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- plugins {
- id 'com.android.application'
- }
- def releaseTime() {
- return new Date().format("yyyyMMddHHmmss", TimeZone.getTimeZone("CTT"))
- }
- android {
- compileSdk 34
- defaultConfig {
- applicationId "com.edufound.model"
- minSdk 21
- //noinspection ExpiredTargetSdkVersion
- targetSdk 34
- versionCode 40
- versionName "4.0"
- testInstrumentationRunner
- flavorDimensions "versionCode"
- manifestPlaceholders = [UMENG_CHANNEL_VALUE: "2006"]//添加一个默认渠道号
- multiDexEnabled true
- ndk {
- abiFilters "arm64-v8a"
- abiFilters "armeabi-v7a"
- abiFilters "armeabi"
- abiFilters "x86"
- // 添加x86必须添加x86_64
- abiFilters "x86_64"
- }
- }
- 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 channel = variant.productFlavors[0].manifestPlaceholders.UMENG_CHANNEL_VALUE;
- def fileName = "edufound_xyyf_v${defaultConfig.versionCode}_${releaseTime()}_${channel}_${defaultConfig.minSdk}_${buildType.name}.apk"
- def newoutputFile = "";
- if (channel == ("0000")) {
- newoutputFile = "义方渠道TV"
- }
- newoutputFile = newoutputFile + "${channel}"
- output.outputFileName = new File(newoutputFile, fileName)
- }
- }
- }
- }
- debug {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- signingConfig signingConfigs.efunboxKey
- zipAlignEnabled true
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- buildFeatures {
- viewBinding true
- }
- sourceSets {
- main {
- jniLibs.srcDirs = ['libs']
- res.srcDirs = [
- 'src/main/res', //默认只有这一个路径
- ]
- }
- }
- productFlavors {
- //义方
- channel_efunbox {
- signingConfig signingConfigs.efunboxKey
- manifestPlaceholders = [
- appCode : "0000",
- umengKey : "",
- roundIcon: "@mipmap/ic_launcher_round",
- appIcon : "@mipmap/ic_launcher",
- banner : "@mipmap/ic_launcher",
- appName : "学有义方"
- ]
- ndk {
- abiFilters "armeabi-v7a"
- abiFilters "arm64-v8a"
- abiFilters "armeabi"
- abiFilters "x86"
- // 添加x86必须添加x86_64
- abiFilters "x86_64"
- }
- }
- //义方文化 移动端
- mobile_channel_efunbox {
- applicationId "com.edufound.android.xyyf"
- manifestPlaceholders = [
- appCode : "0000",
- umengKey : "",
- roundIcon: "@mipmap/ic_launcher_round",
- appIcon : "@mipmap/ic_launcher",
- banner : "@mipmap/ic_launcher",
- appName : "学有义方"
- ]
- ndk {
- abiFilters "armeabi-v7a"
- abiFilters "arm64-v8a"
- abiFilters "armeabi"
- abiFilters "x86"
- // 添加x86必须添加x86_64
- abiFilters "x86_64"
- }
- }
- }
- productFlavors.all {
- flavor ->
- flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: manifestPlaceholders.appCode,
- UMENG_CHANNEL_KEY : manifestPlaceholders.umengKey,
- roundIcon : manifestPlaceholders.roundIcon,
- icon : manifestPlaceholders.appIcon,
- banner : manifestPlaceholders.banner,
- APP_NAME : manifestPlaceholders.appName]
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- }
- dependencies {
- api userLibs.get('appcompat')
- api userLibs.get('material')
- api userLibs.get('constraintlayout')
- api userLibs.get('gson')
- api userLibs.get('recyclerview')
- testImplementation testLibs.get('junit')
- androidTestImplementation testLibs.get('junitAndroid')
- androidTestImplementation testLibs.get('espresso')
- if (isRelease) {
- api project(':app-pay')
- api project(':app-video')
- }
- api project(':app-base')
- }
|