123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- apply plugin: 'com.android.application'
- apply plugin: 'com.jakewharton.butterknife'
- android {
- signingConfigs {
- release {
- storeFile file('../sign/intelhouse.jks')
- storePassword 'intelhousePSW'
- keyAlias = 'intelhousekey'
- keyPassword 'intelhousePSW'
- }
- }
- compileSdkVersion 28
- defaultConfig {
- applicationId "com.mq.xiezaixiaoka"
- minSdkVersion 15
- // targetSdkVersion 22
- targetSdkVersion 28
- versionCode 1
- versionName "2.8"
- ndk {
- abiFilters "armeabi"
- }
- signingConfig signingConfigs.release
- }
- buildTypes {
- release {
- signingConfig signingConfigs.release
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- lintOptions {
- checkReleaseBuilds false
- // Or, if you prefer, you can continue to check for errors in release builds,
- // but continue the build even when errors are found:
- abortOnError false
- }
- // Butterknife requires Java 8.
- compileOptions {
- sourceCompatibility 1.8
- targetCompatibility 1.8
- }
- sourceSets {
- main {
- jniLibs.srcDirs = ['libs']
- }
- }
- // 配置自定义打包名称
- android.applicationVariants.all { variant ->
- variant.outputs.all { output ->
- def outputFile = output.outputFile
- if (outputFile != null && outputFile.name.endsWith('release.apk')) {
- //打包名称 xxxx_yunnan_2.0_201911011522.apk
- def fileName = "火车出库-汽车卸载(销卡)" +// 业务名称
- "_" +
- // 渠道
- "${variant.productFlavors[0].name}" +
- "_" +
- // 版本号
- "${defaultConfig.versionName}" +
- "_" +
- // 时间
- "${new Date().format("yyyyMMddHHmm")}" +
- // 后缀
- ".apk"
- outputFileName = fileName
- }
- }
- }
- flavorDimensions "city"
- productFlavors {
- // 云南
- yunnan {
- dimension "city"
- manifestPlaceholders = [CHANNEL_ID_VALUE: "yunnan"]
- }
- // 山西
- shanxi {
- dimension "city"
- manifestPlaceholders = [CHANNEL_ID_VALUE: "shanxi"]
- }
- // 天津
- tianjin {
- dimension "city"
- manifestPlaceholders = [CHANNEL_ID_VALUE: "tianjin"]
- }
- // // 普洱
- // puer {
- // dimension "city"
- // manifestPlaceholders = [CHANNEL_ID_VALUE: "puer"]
- // }
- }
- }
- dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation project(path: ':mylibrary')
- implementation 'com.jakewharton:butterknife:9.0.0'
- annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0'
- }
|