123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262 |
- apply plugin: 'com.android.application'
- apply plugin: 'android-apt'
- def releaseTime() {
- return new Date().format("yyyy-MM-dd_HH-mm-ss", TimeZone.getTimeZone("GMT+8"))
- }
- android {
- compileSdkVersion rootProject.ext.android.compileSdkVersion
- buildToolsVersion rootProject.ext.android.buildToolsVersion
- // 关闭PNG合法性检查的
- aaptOptions.cruncherEnabled = false
- aaptOptions.useNewCruncher = false
- // 开启dataBinding
- dataBinding.enabled = true
- // 移除lint检查的error
- lintOptions.abortOnError = false
- // 关闭增量编译
- // compileOptions.incremental = false
- defaultConfig {
- applicationId rootProject.ext.android.applicationId
- minSdkVersion rootProject.ext.android.minSdkVersion
- targetSdkVersion rootProject.ext.android.targetSdkVersion
- versionCode 9
- versionName "1.0"
- // dex突破65535的限制
- multiDexEnabled true //
- // alibaba路由跳转添加以来
- javaCompileOptions {
- annotationProcessorOptions {
- arguments = [ moduleName : project.getName() ]
- }
- }
- ndk {
- // 设置支持的 SO 库构架
- abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a'//, 'x86', 'x86_64', 'mips', 'mips64'
- }
- }
- compileOptions {
- encoding "UTF-8"
- }
- signingConfigs {
- debug {
- // No debug config
- // 签名store文件路径
- storeFile file(rootProject.ext.android.storeFile)
- // 签名store文件的密码
- storePassword rootProject.ext.android.storePassword
- // 别名
- keyAlias rootProject.ext.android.keyAlias
- // 别名的密码
- keyPassword rootProject.ext.android.keyPassword
- }
- // 正式版
- release {
- // 签名store文件路径
- storeFile file(rootProject.ext.android.storeFile)
- // 签名store文件的密码
- storePassword rootProject.ext.android.storePassword
- // 别名
- keyAlias rootProject.ext.android.keyAlias
- // 别名的密码
- keyPassword rootProject.ext.android.keyPassword
- }
- }
- buildTypes {
- debug {
- // 显示Log
- buildConfigField "boolean", "LOG_DEBUG", "true"
- signingConfig signingConfigs.debug
- // 版本名后缀
- versionNameSuffix "-debug"
- // 是否混淆
- minifyEnabled false
- // zipAlign优化
- zipAlignEnabled false
- // 是否可以debug
- debuggable true
- jniDebuggable true
- // 移除无用的resource文件
- shrinkResources false
- buildConfigField "boolean", "isRelease", 'false'
- }
- release {
- // 不显示Log
- buildConfigField "boolean", "LOG_DEBUG", "false"
- signingConfig signingConfigs.release
- // 是否混淆
- minifyEnabled true
- // zipAlign优化
- zipAlignEnabled true
- // 移除无用的resource文件
- shrinkResources true
- buildConfigField "boolean", "isRelease", 'true'
- // 混淆配置文件的位置
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- applicationVariants.all { variant ->
- variant.outputs.each { output ->
- def outputFile = output.outputFile
- if (outputFile != null && outputFile.name.endsWith('.apk')) {
- // 输出apk名称为 Ultron_v1.0_2016-04-15_wandoujia.apk
- // 保留基础签名版本
- def fileName
- if (variant.productFlavors[0].name == 'app') {
- fileName = "app-release.apk"
- } else {
- fileName = "Small_v${defaultConfig.versionName}_${releaseTime()}_${variant.productFlavors[0].name}.apk"
- }
- output.outputFile = new File(outputFile.parent, fileName)
- }
- }
- }
- }
- }
- /*
- // 分模块,根据是否是debug,标识是 application 还是 library
- println rootProject.ext.isDebug.toBoolean()
- if (rootProject.ext.isDebug.toBoolean()) {
- apply plugin: 'com.android.application'
- } else {
- apply plugin: 'com.android.library'
- }
- // 分模块,根据是否是debug,使用不同的 Manifest
- sourceSets {
- main {
- if (rootProject.ext.isDebug.toBoolean()) {
- manifest.srcFile 'src/main/debug/AndroidManifest.xml'
- } else {
- manifest.srcFile 'src/main/release/AndroidManifest.xml'
- java {
- exclude 'debug/**'
- }
- }
- }
- }*/
- // 多渠道打包
- productFlavors {
- GooglePlay {}
- umeng {}
- wandoujia {}
- qihu360 {}
- baidu {}
- xiaomi {}
- tencent {}
- qq{}
- s360{}
- ali{}
- anzhi{}
- sougou{}
- huawei{}
- oppo{}
- xiaomi{}
- vivo{}
- lenovo{}
- letv{}
- liqu{}
- coolapk{}
- gfan{}
- mopo{}
- eoe{}
- pc6{}
- nduo{}
- appfun{}
- app {}
- productFlavors.all {
- flavor ->
- flavor.manifestPlaceholders = [APP_CHANNEL_VALUE: name, UMENG_KEY: rootProject.ext.android.umengKey,
- MAP_GD_KEY : rootProject.ext.android.mapGDKey, PARTNER_CODE: rootProject.ext.android.partnerCode
- , GETUI_APP_ID: rootProject.ext.android.getuiAppId, GETUI_APP_KEY: rootProject.ext.android.getuiAppKey
- , GETUI_APP_SECRET: rootProject.ext.android.getuiAppSecret
- , GETUI_APP_MASTER_SECRET: rootProject.ext.android.getuiAppMasterSecret]
- }
- }
- }
- // 导入本地lib
- repositories {
- flatDir {
- dirs 'libs'
- }
- }
- // 应用 Bugtags 插件
- apply plugin: 'com.bugtags.library.plugin'
- // Bugtags 插件配置
- bugtags {
- // 自动上传符号表功能配置,如果需要根据 build varint 配置,请参考帮助中心->符号表->Android 符号表->配置自动上传符号表
- // 这里是你的 appKey
- appKey "acffe161e4fd4aff25e84f7762b19132"
- // 这里是你的 appSecret,管理员在设置页可以查看
- appSecret "6dd32ba546080f03e74f57ec4139c19e"
- mappingUploadEnabled true
- //网络跟踪功能配置(企业版)
- trackingNetworkEnabled true
- }
- dependencies {
- compile fileTree(include: ['*.jar'], dir: 'libs')
- testCompile 'junit:junit:4.12'
- compile project(':logic')
- compile project(':network')
- // compile project(':payments')
- compile project(':tools')
- compile project(':views')
- compile project(':sTLivenessLibrary')
- compile project(':iDCardLib')
- compile project(':livenessLib')
- //compile project(':permission')
- compile 'com.pnikosis:materialish-progress:1.0'
- // Sweet Alert Dialog
- // compile 'cn.pedant.sweetalert:library:1.3'
- compile(name: 'sweet-alert-v1.0', ext: 'aar')
- // 底部导航栏 https://github.com/Ashok-Varma/BottomNavigation
- compile 'com.ashokvarma.android:bottom-navigation-bar:1.3.0'
- // Banner https://github.com/youth5201314/banner
- compile 'com.youth.banner:banner:1.4.1'
- // 图片加载
- compile rootProject.ext.dependencies["glide"]
- // OKHttp方式加载网络图片
- compile rootProject.ext.dependencies["glide-okhttp3-integration"]
- // 强大的 RecyclerView 适配器 https://github.com/CymChad/BaseRecyclerViewAdapterHelper
- compile rootProject.ext.dependencies["baseRecyclerViewAdapterHelper"]
- // 粘性头部 https://github.com/timehop/sticky-headers-recyclerview
- compile rootProject.ext.dependencies["stickyHeadersRecyclerView"]
- // DatePick 效果的弹出选择框
- compile rootProject.ext.dependencies["pickerView"]
- //仿支付宝密码
- compile rootProject.ext.dependencies["GridPasswordView"]
- // URL路由
- compile rootProject.ext.dependencies["activityRouter"]
- // android权限管理 https://github.com/yanzhenjie/AndPermission
- //compile rootProject.ext.dependencies["permission"]
- apt rootProject.ext.dependencies["activityRouter-compiler"]
- // URL路由
- compile rootProject.ext.dependencies["ARouter"]
- apt rootProject.ext.dependencies["ARouter-compiler"]
- // Bugtags
- compile 'com.bugtags.library:bugtags-lib:latest.integration'
- compile files('libs/mta-sdk-1.6.2.jar')
- compile 'com.joanzapata.iconify:android-iconify:2.2.2'
- compile(name: 'livebodylibrary-release', ext: 'aar')
- //compile files('libs/library-2.4.0.jar')
- compile files('libs/FridaySDK_V1.0.0.jar')
- // 集成个推maven 库
- compile 'com.getui:sdk-for-google-play:2.10.3.1'
- compile 'com.youth.banner:banner:1.4.1'
- compile files('libs/alipaySdk-20170725.jar')
- compile files('libs/baiqishi-risk-sdk-2.2.1.jar')
- }
|