123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- apply plugin: 'com.android.application'
- apply plugin: 'com.jakewharton.butterknife'
- apply plugin: 'org.greenrobot.greendao' // apply plugin
- //设置发布的显示的版本号
- static def getVersionName() {
- return new Date().format("yyyyMMddHHmm")
- }
- android {
- signingConfigs {
- depot {
- keyAlias 'depotkey'
- keyPassword 'depotPSW'
- storeFile file('../sign/depot.jks')
- storePassword 'depotPSW'
- }
- }
- compileSdkVersion 28
- defaultConfig {
- applicationId "com.chinaitop.linxia.detop"
- minSdkVersion 15
- targetSdkVersion 22
- versionCode 19
- versionName "1.19"
- flavorDimensions "default"
- signingConfig signingConfigs.depot
- ndk {
- // 设置支持的SO库架构
- abiFilters 'armeabi-v7a', 'x86'//, 'x86_64'//, 'arm64-v8a'
- }
- javaCompileOptions {
- annotationProcessorOptions {
- includeCompileClasspath = true
- }
- }
- }
- // Butterknife requires Java 8.
- compileOptions {
- sourceCompatibility 1.8
- targetCompatibility 1.8
- }
- 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 {
- tianjin {
- applicationId "com.chinaitop.tianjin.detop"
- dimension "default"
- manifestPlaceholders = [APP_NAME: "@string/app_name_tianjin"]
- signingConfig signingConfigs.depot
- }
- }
- 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
- }
- }
- greendao {
- schemaVersion 7 //指定数据库schema版本号
- targetGenDir 'src/main/java'//生成数据库文件的目录
- }
- dependencies {
- implementation fileTree(include: ['*.jar'], dir: 'libs')
- implementation project(':MPChartLib')
- implementation project(':mqlibrary')
- implementation 'com.android.support:gridlayout-v7:28.0.0'
- implementation 'com.android.support:appcompat-v7:28.0.0'
- implementation 'com.android.support.constraint:constraint-layout:2.0.4'
- // implementation 'net.zetetic:android-database-sqlcipher:3.5.7'
- annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc2'
- implementation 'com.google.android:flexbox:1.0.0'
- }
|