build.gradle 4.3 KB

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