build.gradle 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'org.greenrobot.greendao' // apply plugin
  3. apply plugin: 'kotlin-android' // apply plugin
  4. android {
  5. compileSdkVersion COMPILE_SDK_VERSION as int
  6. buildToolsVersion BUILD_TOOLS_VERSION
  7. defaultConfig {
  8. applicationId "com.tofly.psjgsn"
  9. minSdkVersion MIN_SDK_VERSION
  10. targetSdkVersion TARGET_SDK_VERSION as int
  11. versionCode 78
  12. versionName "7.8"
  13. flavorDimensions "versionCode"
  14. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  15. ndk {
  16. //选择要添加的对应cpu类型的.so库。
  17. abiFilters 'armeabi-v7a' /* , 'armeabi' ,'x86', 'x86_64',"arm64-v8a"*/
  18. // 还可以添加 'x86', 'x86_64', 'mips', 'mips64'
  19. }
  20. }
  21. signingConfigs {
  22. release {
  23. storeFile file('D:\\Code\\psjgxt_sn_app\\psjgsn.jks')
  24. storePassword 'tofly028'
  25. keyAlias 'psjgsn'
  26. keyPassword 'tofly028'
  27. }
  28. }
  29. buildTypes {
  30. release {
  31. minifyEnabled false
  32. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  33. }
  34. }
  35. sourceSets {
  36. main {
  37. jniLibs.srcDir 'libs'
  38. }
  39. }
  40. greendao {
  41. schemaVersion 8 //数据库版本号
  42. daoPackage 'com.tofly.sn.greenDao.db'
  43. // 设置DaoMaster、DaoSession、Dao 包名
  44. targetGenDir 'src/main/java'//设置DaoMaster、DaoSession、Dao目录,请注意,这里路径用/不要用.
  45. generateTests false //设置为true以自动生成单元测试。
  46. targetGenDirTests 'src/main/java' //应存储生成的单元测试的基本目录。默认为 src / androidTest / java。
  47. }
  48. buildFeatures {
  49. viewBinding = true
  50. dataBinding = true
  51. }
  52. android.applicationVariants.configureEach { variant ->
  53. variant.outputs.configureEach { output ->
  54. def outputFile = output.outputFile
  55. if (outputFile != null && outputFile.name.endsWith('.apk')) {
  56. if (variant.buildType.name == 'release') {
  57. outputFileName = "psjgxt_sn-${defaultConfig.versionName}.apk"
  58. } else if (variant.buildType.name == 'debug') {
  59. outputFileName = "psjgxt_sn-${defaultConfig.versionName}.apk"
  60. }
  61. }
  62. def fileName = "psjgxt_sn-${variant.versionName}.apk"
  63. outputFileName = fileName
  64. }
  65. }
  66. kotlinOptions {
  67. jvmTarget = '1.8'
  68. }
  69. compileOptions {
  70. sourceCompatibility JavaVersion.VERSION_1_8
  71. targetCompatibility JavaVersion.VERSION_1_8
  72. }
  73. buildTypes {
  74. release {
  75. minifyEnabled false
  76. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  77. }
  78. }
  79. }
  80. dependencies {
  81. implementation fileTree(dir: "libs", include: ["*.jar"])
  82. implementation 'androidx.appcompat:appcompat:1.2.0'
  83. implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
  84. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  85. implementation files('libs\\HikVideoPlayer.jar')
  86. testImplementation 'junit:junit:4.12'
  87. androidTestImplementation 'androidx.test.ext:junit:1.1.1'
  88. androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  89. implementation files('libs\\arcgis-android-100.9.0.aar')
  90. implementation project(path: ':camera')
  91. implementation project(path: ':latte-core')
  92. implementation project(path: ':graffiti')
  93. implementation 'com.youth.banner:banner:1.4.10'
  94. implementation 'com.amap.api:location:5.2.0' //定位功能
  95. implementation 'com.amap.api:search:7.7.0' //搜索功能
  96. implementation 'com.amap.api:navi-3dmap:7.7.1_3dmap7.7.0' //导航
  97. //implementation 'com.polites.android:gesture-imageview:1.0'
  98. implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'//图标
  99. implementation 'com.jph.takephoto:takephoto_library:4.0.3'
  100. implementation 'org.greenrobot:greendao:3.3.0'
  101. implementation 'com.github.yuweiguocn:GreenDaoUpgradeHelper:v2.0.2'
  102. //design 包依赖
  103. //noinspection GradleCompatible
  104. implementation 'com.android.support:design:29.0.0'
  105. implementation 'q.rorbin:badgeview:1.1.3' //小圆点
  106. implementation 'id.zelory:compressor:2.1.1' // 图片压缩
  107. //PermissionsDispatcher权限
  108. implementation 'org.permissionsdispatcher:permissionsdispatcher:4.6.0'
  109. annotationProcessor "org.permissionsdispatcher:permissionsdispatcher-processor:4.6.0"
  110. implementation 'org.greenrobot:eventbus:3.2.0'
  111. implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
  112. implementation 'androidx.core:core-ktx:1.3.1'
  113. //butterknife 依赖
  114. implementation 'com.jakewharton:butterknife:10.2.3'
  115. annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'
  116. /*数据库导出Excel文件*/
  117. implementation 'net.sourceforge.jexcelapi:jxl:2.6.12'
  118. // implementation 'com.google.zxing:core:3.3.3'
  119. //内存泄露
  120. // debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7'
  121. }