apply plugin: 'com.android.application' apply plugin: 'org.greenrobot.greendao' // apply plugin //设置发布的显示的版本号 static def getVersionName() { return new Date().format("yyyyMMddHHmm") } android { signingConfigs { depot { keyAlias 'depotkey' keyPassword 'depotPSW' storeFile file('depot.jks') storePassword 'depotPSW' } } compileSdkVersion 27 defaultConfig { applicationId "com.chinaitop.linxia.detop" minSdkVersion 15 targetSdkVersion 27 versionCode 3 versionName "1.2" flavorDimensions "default" ndk { // 设置支持的SO库架构 abiFilters 'armeabi', 'x86'//, 'armeabi-v7a', 'x86_64', 'arm64-v8a' } javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } } signingConfig signingConfigs.depot multiDexEnabled true } buildTypes { debug {} release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.depot } } 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')) { def fileName = "${variant.productFlavors[0].name}_depot_release_" + "${defaultConfig.versionCode}_${new Date().format("yyyyMMddHHmm")}.apk" outputFileName = fileName } } } productFlavors { jiangxi { applicationId "com.chinaitop.linxia.detop.jiangxi" dimension "default" manifestPlaceholders = [APP_NAME: "@string/app_name"] signingConfig signingConfigs.depot } linxia { applicationId "com.chinaitop.linxia.detop" dimension "default" manifestPlaceholders = [APP_NAME: "@string/app_name"] signingConfig signingConfigs.depot } } lintOptions { checkReleaseBuilds false abortOnError false } } greendao { schemaVersion 6 //指定数据库schema版本号 targetGenDir 'src/main/java'//生成数据库文件的目录 } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') // compile 'com.tencent.bugly:nativecrashreport:latest.release' // compile 'com.jakewharton:butterknife:7.0.0' implementation project(':MPChartLib') implementation project(':mqlibrary') implementation 'com.android.support:gridlayout-v7:27.0.2' implementation 'net.zetetic:android-database-sqlcipher:3.5.7' annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' }