build.gradle 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'com.didi.virtualapk.plugin'
  3. android {
  4. compileSdkVersion ANDROID_COMPILE_SDK_VERSION as int
  5. defaultConfig {
  6. applicationId "com.kfzs.cfyl.media"
  7. minSdkVersion ANDROID_MIN_SDK_VERSION as int
  8. targetSdkVersion ANDORID_TARGET_SDK_VERSION as int
  9. versionCode 1
  10. versionName "1.0"
  11. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  12. ndk {
  13. abiFilters "armeabi-v7a", 'x86'//, 'armeabi-v7a', 'x86_64', 'arm64-v8a'
  14. }
  15. }
  16. signingConfigs {
  17. config {
  18. keyAlias 'sheep'
  19. keyPassword 'zhaoyi2004'
  20. storeFile file('.././../sign.jks')
  21. storePassword 'zhaoyi2004'
  22. v1SigningEnabled true
  23. v2SigningEnabled false
  24. }
  25. }
  26. buildTypes {
  27. release {
  28. minifyEnabled false
  29. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  30. signingConfig signingConfigs.config
  31. }
  32. debug {
  33. signingConfig signingConfigs.config
  34. }
  35. }
  36. // splits {
  37. // abi {
  38. // enable true
  39. // reset()
  40. // include 'x86', 'armeabi-v7a', 'arm64-v8a'
  41. //// include 'mips', 'arm64-v8a', 'x86', 'x86_64', 'armeabi', 'armeabi-v7a'
  42. // universalApk false
  43. // }
  44. // }
  45. }
  46. dependencies {
  47. implementation fileTree(dir: 'libs', include: ['*.jar'])
  48. implementation "com.android.support:appcompat-v7:$supportLibVersion"
  49. testImplementation 'junit:junit:4.12'
  50. androidTestImplementation 'com.android.support.test:runner:1.0.2'
  51. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  52. //显示图片视频帧,在插件中不兼容x86模拟器,所以x86不考虑
  53. implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever:1.0.14'
  54. implementation project(':share_library')
  55. implementation("com.android.support:recyclerview-v7:$supportLibVersion")
  56. implementation 'com.android.support.constraint:constraint-layout:1.1.3'
  57. implementation 'com.github.ybq:Android-SpinKit:1.1.0'
  58. //All arch: armeabi, armeabi-v7a, arm64-v8a, mips, x86
  59. implementation 'org.wysaid:gpuimage-plus:2.5.1'
  60. //Pure graphics lib without ffmpeg. (all arch for branch 'min')
  61. // implementation 'org.wysaid:gpuimage-plus:2.5.1-min'
  62. implementation('com.github.bumptech.glide:glide:4.1.1') {
  63. exclude group: 'com.android.support', module: 'support-fragment'
  64. // exclude group: 'com.github.bumptech.glide', module: 'gifdecoder'
  65. // exclude group: 'com.github.bumptech.glide', module: 'disklrucache'
  66. // exclude group: 'com.github.bumptech.glide', module: 'annotations'
  67. }
  68. annotationProcessor 'com.github.bumptech.glide:compiler:4.1.1'
  69. implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.34'
  70. //fast json
  71. implementation 'com.alibaba:fastjson:1.2.52'
  72. }
  73. virtualApk {
  74. packageId = 0x6f // The package id of Resources.
  75. targetHost='../app' // The path of application module in host project.
  76. applyHostMapping = true // [Optional] Default value is true.
  77. forceUseHostDependences = true
  78. }
  79. //static def releaseTime() {
  80. // return new Date().format("MMddHHmm", TimeZone.getDefault())
  81. //}
  82. //在apk文件后边生成版本号信息
  83. android.applicationVariants.all {
  84. variant ->
  85. variant.outputs.all {
  86. output ->
  87. // if (buildType.name == "release") {
  88. outputFileName = "media_release.apk"
  89. // outputFileName = "media_${output.getFilter(com.android.build.OutputFile.ABI)}.apk"
  90. // outputFileName = "media_v${versionCode}-${releaseTime()}_${output.getFilter(com.android.build.OutputFile.ABI)}.apk"
  91. // }
  92. }
  93. }