build.gradle 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever:1.0.14'
  53. implementation project(':share_library')
  54. implementation("com.android.support:recyclerview-v7:$supportLibVersion")
  55. implementation 'com.android.support.constraint:constraint-layout:1.1.3'
  56. implementation 'com.github.ybq:Android-SpinKit:1.1.0'
  57. //All arch: armeabi, armeabi-v7a, arm64-v8a, mips, x86
  58. implementation 'org.wysaid:gpuimage-plus:2.5.1'
  59. //Pure graphics lib without ffmpeg. (all arch for branch 'min')
  60. // implementation 'org.wysaid:gpuimage-plus:2.5.1-min'
  61. implementation('com.github.bumptech.glide:glide:4.1.1') {
  62. exclude group: 'com.android.support', module: 'support-fragment'
  63. // exclude group: 'com.github.bumptech.glide', module: 'gifdecoder'
  64. // exclude group: 'com.github.bumptech.glide', module: 'disklrucache'
  65. // exclude group: 'com.github.bumptech.glide', module: 'annotations'
  66. }
  67. annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
  68. }
  69. virtualApk {
  70. packageId = 0x6f // The package id of Resources.
  71. targetHost='../app' // The path of application module in host project.
  72. applyHostMapping = true // [Optional] Default value is true.
  73. forceUseHostDependences = true
  74. }
  75. //static def releaseTime() {
  76. // return new Date().format("MMddHHmm", TimeZone.getDefault())
  77. //}
  78. //在apk文件后边生成版本号信息
  79. android.applicationVariants.all {
  80. variant ->
  81. variant.outputs.all {
  82. output ->
  83. // if (buildType.name == "release") {
  84. outputFileName = "media_release.apk"
  85. // outputFileName = "media_${output.getFilter(com.android.build.OutputFile.ABI)}.apk"
  86. // outputFileName = "media_v${versionCode}-${releaseTime()}_${output.getFilter(com.android.build.OutputFile.ABI)}.apk"
  87. // }
  88. }
  89. }