123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- apply plugin: 'com.android.application'
- def releaseTime() {
- return new Date().format("yyyyMMdd", TimeZone.getTimeZone("UTC"))
- }
- android {
- compileSdkVersion 30
- buildToolsVersion "30.0.1"
- defaultConfig {
- applicationId "com.edufound.bytedance"
- minSdkVersion 14
- targetSdkVersion 30
- versionCode 1
- versionName "1.0"
- multiDexEnabled true
- flavorDimensions "versionCode"
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- manifestPlaceholders = [APP_SCHEME_HOST: "com.edufound.bytedance.yuwen.prepare"]
- }
- signingConfigs {
- efunbox {
- keyAlias "edufound_key"
- keyPassword "edufound321"
- storeFile file("C:/Users/Candy/Desktop/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 channel = variant.productFlavors[0].manifestPlaceholders.APP_SCHEME_HOST;
- def newoutputFile = "";
- def apptype = "";
- if (channel.contains("yuwen.prepare")) {
- newoutputFile = "\\语文预习\\"
- apptype = "yuwen_prepare";
- } else if (channel.contains("yuwen.review")) {
- newoutputFile = "\\语文复习\\"
- apptype = "yuwen_review";
- } else if (channel.contains("mathematics.prepare")) {
- newoutputFile = "\\数学预习\\"
- apptype = "mathematics_prepare";
- } else if (channel.contains("mathematics.review")) {
- newoutputFile = "\\数学复习\\"
- apptype = "mathematics_review";
- }
- def fileName = "efunbox_bytedance_v${defaultConfig.versionCode}_${releaseTime()}_${apptype}_r.apk"
- output.outputFileName = new File(newoutputFile, fileName)
- }
- }
- }
- }
- }
- sourceSets {
- main {
- jniLibs.srcDirs = ["libs"]
- }
- }
- productFlavors {
- // 语文预习
- yuwen_prepare {
- signingConfig signingConfigs.efunbox
- applicationIdSuffix ".yuwen.prepare"
- manifestPlaceholders = [schemeHost: "com.edufound.bytedance.yuwen.prepare",
- appName : "语文预习"
- ]
- }
- // 语文复习
- yuwen_review {
- signingConfig signingConfigs.efunbox
- applicationIdSuffix ".yuwen.review"
- manifestPlaceholders = [schemeHost: "com.edufound.bytedance.yuwen.review",
- appName : "语文复习"
- ]
- }
- // 数学预习
- mathematics_prepare {
- signingConfig signingConfigs.efunbox
- applicationIdSuffix ".mathematics.prepare"
- manifestPlaceholders = [schemeHost: "com.edufound.bytedance.mathematics.prepare",
- appName : "数学预习"
- ]
- }
- // 数学复习
- mathematics_review {
- signingConfig signingConfigs.efunbox
- applicationIdSuffix ".mathematics.review"
- manifestPlaceholders = [schemeHost: "com.edufound.bytedance.mathematics.review",
- appName : "数学复习"
- ]
- }
- }
- productFlavors.all {
- flavor ->
- flavor.manifestPlaceholders = [
- APP_SCHEME_HOST: manifestPlaceholders.schemeHost,
- APP_NAME : manifestPlaceholders.appName
- ]
- }
- }
- repositories {
- flatDir {
- dirs 'libs'
- }
- }
- dependencies {
- implementation fileTree(dir: "libs", include: ["*.jar"])
- implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
- implementation 'androidx.core:core-ktx:1.3.1'
- implementation 'androidx.appcompat:appcompat:1.2.0'
- //okhttp3
- implementation 'com.squareup.okhttp3:okhttp:4.8.0'
- implementation 'com.squareup.okio:okio:2.7.0'
- //gson
- implementation 'com.google.code.gson:gson:2.8.6'
- //umeng
- implementation 'com.umeng.umsdk:common:9.3.0' // (必选)版本号
- implementation 'com.umeng.umsdk:asms:1.1.3' // asms包依赖(必选)
- implementation 'com.umeng.umsdk:crash:0.0.5' // native crash包依赖(必选)
- }
|