build.gradle 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. apply plugin: 'com.android.application'
  2. android {
  3. signingConfigs {
  4. bBengConfig {
  5. keyAlias 'bBeng'
  6. keyPassword 'yuyekeji'
  7. storeFile file('D:/TPlat/Android-2.9.8/bBeng-2.9.8/bBeng.jks')
  8. storePassword 'yuyekeji'
  9. }
  10. }
  11. compileSdkVersion 28
  12. buildToolsVersion '28.0.3'
  13. defaultConfig {
  14. // applicationId "com.HBuilder.UniPlugin"
  15. minSdkVersion 19
  16. targetSdkVersion 26
  17. //建议此属性值设为21 io.dcloud.PandoraEntry 作为apk入口时 必须设置 targetSDKVersion>=21 沉浸式才生效
  18. versionCode 21012601
  19. versionName "2.1.4"
  20. multiDexEnabled true
  21. ndk {
  22. abiFilters 'x86', 'armeabi-v7a'
  23. }
  24. }
  25. buildTypes {
  26. release {
  27. minifyEnabled false
  28. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  29. signingConfig signingConfigs.bBengConfig
  30. }
  31. }
  32. //使用uniapp时,需复制下面代码
  33. /*代码开始*/
  34. aaptOptions {
  35. additionalParameters '--auto-add-overlay'
  36. //noCompress 'foo', 'bar'
  37. ignoreAssetsPattern "!.svn:!.git:.*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~"
  38. }
  39. /*代码结束*/
  40. //多渠道打包
  41. flavorDimensions "version"
  42. productFlavors {
  43. //哔蹦渠道
  44. BBeng {
  45. //修改包名
  46. applicationId "com.YuyeTech.BBeng"
  47. //修改app名字,string资源下不能包含"app_name"
  48. resValue "string", "app_name", "哔蹦"
  49. dimension "version"
  50. }
  51. }
  52. /**
  53. * 打包导出apk时候的名字,或者各种服务的key配置等等
  54. * */
  55. applicationVariants.all { variant ->
  56. variant.outputs.all {
  57. outputFileName = "${variant.flavorName}_v${variant.versionName}_${releaseTime()}.apk"
  58. }
  59. }
  60. }
  61. //打包时间
  62. def releaseTime() {
  63. return new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("UTC"))
  64. }
  65. repositories {
  66. flatDir {
  67. dirs 'libs'
  68. }
  69. }
  70. dependencies {
  71. implementation fileTree(include: ['*.jar'], dir: 'libs')
  72. implementation fileTree(include: ['*.aar'], dir: 'libs')
  73. implementation 'com.android.support:support-v4:28.0.0'
  74. implementation 'com.android.support:appcompat-v7:28.0.0'
  75. /*uniapp所需库-----------------------开始*/
  76. implementation 'com.android.support:recyclerview-v7:28.0.0'
  77. implementation 'com.facebook.fresco:fresco:1.13.0'
  78. implementation 'com.facebook.fresco:animated-gif:1.13.0'
  79. /*uniapp所需库-----------------------结束*/
  80. // 基座需要,必须添加
  81. implementation 'com.github.bumptech.glide:glide:4.9.0'
  82. implementation 'com.alibaba:fastjson:1.1.46.android'
  83. // 添加uni-app插件
  84. implementation project(':uniplugin_component')
  85. implementation project(':uniplugin_module')
  86. implementation project(':uniplugin_richalert')
  87. }