123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- apply plugin: 'com.android.application'
- android {
- signingConfigs {
- release {
- storeFile file('../nfctool.jks')
- storePassword '123456'
- keyAlias = 'nfctool'
- keyPassword '123456'
- }
- }
- compileSdkVersion 22
- defaultConfig {
- applicationId "com.mq.nfctool"
- minSdkVersion 15
- targetSdkVersion 22
- versionCode 1
- versionName "1.0"
- ndk {
- abiFilters "armeabi","x86"
- }
- signingConfig signingConfigs.release
- }
- 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
- }
- buildTypes {
- release {
- signingConfig signingConfigs.release
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- 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 = "PuerTool" +// 业务名称
- "_" +
- // 版本号
- "${defaultConfig.versionName}" +
- "_" +
- // 时间
- "${new Date().format("yyyyMMddHHmm")}" +
- // 后缀
- ".apk"
- outputFileName = fileName
- }
- }
- }
- }
- dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation project(':commonLib')
- implementation 'com.android.support:appcompat-v7:22.2.1'
- implementation 'com.android.support.constraint:constraint-layout:1.1.3'
- }
|