build.gradle 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'org.greenrobot.greendao'
  3. android {
  4. compileSdkVersion 29
  5. buildToolsVersion "29.0.3"
  6. defaultConfig {
  7. applicationId "com.tofly.yxpc"
  8. minSdkVersion 21
  9. //noinspection OldTargetApi
  10. targetSdkVersion 29
  11. versionCode 90
  12. versionName "9.0"
  13. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  14. ndk {
  15. abiFilters 'arm64-v8a'
  16. }
  17. }
  18. signingConfigs {
  19. release {
  20. storeFile file('D:\\Code\\yx_pc\\yx_keystore.jks')
  21. storePassword 'tofly028'
  22. keyAlias 'zm'
  23. keyPassword 'tofly028'
  24. }
  25. }
  26. buildTypes {
  27. release {
  28. //是否优化zip
  29. zipAlignEnabled true
  30. //启用代码混淆
  31. minifyEnabled false
  32. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  33. }
  34. }
  35. buildFeatures {
  36. viewBinding = true
  37. dataBinding = true
  38. }
  39. compileOptions {
  40. sourceCompatibility JavaVersion.VERSION_1_8
  41. targetCompatibility JavaVersion.VERSION_1_8
  42. }
  43. greendao {
  44. schemaVersion 13 //数据库版本号
  45. daoPackage 'com.tofly.yxpc.greenDao'
  46. // 设置DaoMaster、DaoSession、Dao 包名
  47. targetGenDir 'src/main/java'//设置DaoMaster、DaoSession、Dao目录,请注意,这里路径用/不要用.
  48. generateTests false //设置为true以自动生成单元测试。
  49. targetGenDirTests 'src/main/java' //应存储生成的单元测试的基本目录。默认为 src / androidTest / java。
  50. }
  51. android.applicationVariants.configureEach { variant ->
  52. variant.outputs.configureEach { output ->
  53. def outputFile = output.outputFile
  54. if (outputFile != null && outputFile.name.endsWith('.apk')) {
  55. if (variant.buildType.name == 'release') {
  56. outputFileName = "yx_pc-${defaultConfig.versionName}.apk"
  57. } else if (variant.buildType.name == ('debug')) {
  58. outputFileName = "yx_pc-${defaultConfig.versionName}.apk"
  59. }
  60. }
  61. def fileName = "yx_pc-${variant.versionName}.apk"
  62. outputFileName = fileName
  63. }
  64. }
  65. }
  66. dependencies {
  67. implementation fileTree(dir: "libs", include: ["*.jar"])
  68. //noinspection GradleDependency
  69. implementation 'androidx.appcompat:appcompat:1.3.0-alpha02'
  70. implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
  71. implementation project(path: ':latte-core')
  72. implementation project(path: ':graffiti')
  73. testImplementation 'junit:junit:4.13.2'
  74. androidTestImplementation 'androidx.test.ext:junit:1.1.3'
  75. androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
  76. annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'
  77. implementation 'com.journeyapps:zxing-android-embedded:3.6.0'
  78. implementation 'org.greenrobot:greendao:3.3.0'
  79. implementation 'com.github.yuweiguocn:GreenDaoUpgradeHelper:v2.0.2'
  80. //圆形图片
  81. implementation 'com.makeramen:roundedimageview:2.2.1'
  82. //高德地图
  83. //noinspection GradleDependency
  84. implementation 'com.amap.api:location:5.2.0' //定位功能
  85. //noinspection GradleDependency
  86. implementation 'com.amap.api:search:7.7.0' //搜索功能
  87. //noinspection GradleDependency
  88. implementation 'com.amap.api:navi-3dmap:7.7.1_3dmap7.7.0' //导航
  89. //noinspection GradleDependency
  90. implementation 'id.zelory:compressor:2.1.1' // 图片压缩
  91. implementation 'com.jph.takephoto:takephoto_library:4.0.3'
  92. implementation 'com.github.yellowcath:VideoProcessor:2.4.0'
  93. implementation 'cn.jzvd:jiaozivideoplayer:7.7.0'
  94. implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
  95. implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.8'
  96. implementation 'com.kyleduo.switchbutton:library:1.4.1'
  97. //内存泄露
  98. // debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7'
  99. }