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' }