1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- apply plugin: 'com.android.application'
- apply plugin: 'org.greenrobot.greendao'
- apply plugin: 'bugly'
- //设置发布的显示的版本号
- static def getVersionName() {
- return new Date().format("yyyyMMddHHmm")
- }
- android {
- compileSdkVersion 26
- buildToolsVersion "26.0.2"
- defaultConfig {
- applicationId "hf.lskj.com.carstockcount"
- minSdkVersion 19
- targetSdkVersion 26
- versionCode 1
- versionName '1.0.0'
- // testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
- //添加部分
- javaCompileOptions {
- annotationProcessorOptions {
- includeCompileClasspath true
- }
- }
- }
- signingConfigs {
- //配置keystore签名
- release {
- v1SigningEnabled true
- v2SigningEnabled true
- storeFile file('intelhouse.jks')
- storePassword "intelhousePSW"
- keyAlias "intelhousekey"
- keyPassword "intelhousePSW"
- }
- }
- buildTypes {
- debug {}
- release {
- signingConfig signingConfigs.release
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
- sourceSets {
- main {
- jniLibs.srcDirs = ['libs']
- }
- }
- //配置自定义打包名称
- // applicationVariants.all { variant ->
- // variant.outputs.each { output ->
- // def outputFile = output.outputFile
- // if (outputFile != null && outputFile.name.endsWith('.apk')) {
- // if (variant.buildType.name.equals('release')) {
- // def originalName= outputFile.name.substring(0,outputFile.name.indexOf('.apk'))
- // variant.mergedFlavor.versionName = getVersionName()
- // def fileName = originalName+"${variant.mergedFlavor.versionName}.apk"
- // output.outputFile = new File(outputFile.parent, fileName)
- // }
- //
- // }
- // }
- // }
- lintOptions {
- checkReleaseBuilds false
- abortOnError false
- }
- productFlavors {
- }
- }
- bugly {
- appId = 'c7b34b5874' // 注册时分配的App ID
- appKey = '9663ec33-8e14-47e4-94cf-8939f9ea0e78' // 注册时分配的App Key
- }
- greendao {
- schemaVersion 12 //指定数据库schema版本号
- targetGenDir 'src/main/java'//生成数据库文件的目录
- }
- dependencies {
- compile fileTree(include: ['*.jar'], dir: 'libs')
- // androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
- // exclude group: 'com.android.support', module: 'support-annotations'
- // })
- compile 'com.tencent.bugly:crashreport:latest.release'
- compile 'org.greenrobot:eventbus:3.0.0'
- compile 'com.android.support.constraint:constraint-layout:1.0.2'
- compile 'com.android.support:appcompat-v7:26.0.2'
- compile 'com.google.code.gson:gson:2.8.0'
- compile 'com.jakewharton:butterknife:7.0.1'
- compile 'org.greenrobot:greendao:3.2.2'
- compile 'com.android.support:design:26.0.2'
- compile 'com.android.support:support-v4:26.0.2'
- compile 'com.squareup.okhttp3:okhttp:3.8.1'
- // testCompile 'junit:junit:4.12'
- }
|