build.gradle 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'org.greenrobot.greendao' // apply plugin
  3. apply plugin: 'kotlin-android' // apply plugin
  4. android {
  5. ndkVersion "24.0.8215888"
  6. signingConfigs {
  7. release {
  8. storeFile file('D:\\Code\\TYuan\\keystore.jks')
  9. storePassword '1122334455'
  10. keyAlias 'keystore'
  11. keyPassword '1122334455'
  12. }
  13. }
  14. compileSdkVersion COMPILE_SDK_VERSION as int
  15. buildToolsVersion BUILD_TOOLS_VERSION
  16. defaultConfig {
  17. applicationId "com.tofly.dewater"
  18. minSdkVersion MIN_SDK_VERSION
  19. targetSdkVersion TARGET_SDK_VERSION as int
  20. versionCode 15
  21. versionName "1.5"
  22. flavorDimensions "versionCode"
  23. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  24. // buildFeatures.dataBinding = true
  25. ndk {
  26. //选择要添加的对应cpu类型的.so库。
  27. abiFilters 'armeabi-v7a' , 'armeabi'
  28. // 还可以添加 'x86', 'x86_64', 'mips', 'mips64'
  29. }
  30. //手动添加
  31. sourceSets {
  32. main {
  33. jniLibs.srcDirs = ['libs']
  34. }
  35. }
  36. }
  37. buildTypes {
  38. release {
  39. minifyEnabled false
  40. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  41. }
  42. }
  43. compileOptions {
  44. sourceCompatibility = 1.8
  45. targetCompatibility = 1.8
  46. }
  47. buildFeatures {
  48. viewBinding = true
  49. dataBinding = true
  50. }
  51. greendao {
  52. schemaVersion 47 //数据库版本号 30
  53. daoPackage 'com.tofly.dewater.greenDao.db'
  54. // 设置DaoMaster、DaoSession、Dao 包名
  55. targetGenDir 'src/main/java'//设置DaoMaster、DaoSession、Dao目录,请注意,这里路径用/不要用.
  56. generateTests false //设置为true以自动生成单元测试。
  57. targetGenDirTests 'src/main/java' //应存储生成的单元测试的基本目录。默认为 src / androidTest / java。
  58. }
  59. productFlavors {
  60. develop {}
  61. }
  62. android.applicationVariants.all { variant ->
  63. variant.outputs.all { output ->
  64. def outputFile = output.outputFile
  65. if (outputFile != null && outputFile.name.endsWith('.apk')) {
  66. if (variant.buildType.name.equals('release')) {
  67. outputFileName = "rs_route-${defaultConfig.versionName}.apk"
  68. } else if (variant.buildType.name.equals('debug')) {
  69. outputFileName = "rs_route-${defaultConfig.versionName}.apk"
  70. }
  71. }
  72. def fileName = "rs_route-${variant.versionName}.apk"
  73. outputFileName = fileName
  74. }
  75. }
  76. kotlinOptions {
  77. jvmTarget = '1.8'
  78. }
  79. }
  80. dependencies {
  81. implementation fileTree(include: ['*.jar'], dir: 'libs')
  82. implementation 'androidx.appcompat:appcompat:1.2.0'
  83. implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
  84. implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
  85. implementation files('libs\\arcgis-android-100.9.0.aar')
  86. implementation files('libs\\json-lib-2.1-jdk15.jar')
  87. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  88. implementation files('libs\\com.supermap.data_v1021.jar')
  89. implementation files('libs\\com.supermap.mapping_v1021.jar')
  90. implementation files('libs\\com.supermap.navigation_v1021.jar')
  91. implementation files('libs\\com.supermap.services_v1021.jar')
  92. implementation files('libs\\com.supermap.track_v1021.jar')
  93. implementation project(path: ':camera')
  94. implementation files('libs\\commons-httpclient-3.0.1.jar')
  95. testImplementation 'junit:junit:4.12'
  96. androidTestImplementation 'androidx.test.ext:junit:1.1.2'
  97. androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  98. implementation project(path: ':latte-core')
  99. implementation project(path: ':graffiti')
  100. //design 包依赖
  101. implementation 'com.android.support:design:29.0.0'
  102. //butterknife 依赖
  103. implementation 'com.jakewharton:butterknife:10.2.3'
  104. annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'
  105. implementation 'org.greenrobot:greendao:3.3.0'
  106. implementation 'com.github.yuweiguocn:GreenDaoUpgradeHelper:v2.0.2'
  107. // add library
  108. //PermissionsDispatcher权限
  109. implementation 'org.permissionsdispatcher:permissionsdispatcher:4.6.0'
  110. annotationProcessor "org.permissionsdispatcher:permissionsdispatcher-processor:4.6.0"
  111. implementation 'org.greenrobot:eventbus:3.2.0'
  112. // arcgis
  113. //api 'com.esri.arcgisruntime:arcgis-android:100.9.0'
  114. // implementation files('../../Arcgis/libs/arcgis-android-100.9.0.aar')
  115. //implementation files('libs/AMap_Location_V5.2.0_20200915.jar')
  116. implementation 'com.jph.takephoto:takephoto_library:4.0.3'
  117. //implementation files('libs/AMap_Search_V7.3.0_20200331.jar')
  118. /*数据库导出Excel文件*/
  119. implementation 'net.sourceforge.jexcelapi:jxl:2.6.12'
  120. /*高德定位*/
  121. implementation 'com.amap.api:location:5.2.0' //定位功能
  122. implementation 'com.amap.api:search:7.7.0' //搜索功能
  123. implementation 'com.amap.api:navi-3dmap:7.7.1_3dmap7.7.0' //导航
  124. //implementation 'com.polites.android:gesture-imageview:1.0'
  125. implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'//图标
  126. implementation 'q.rorbin:badgeview:1.1.3' //小圆点
  127. implementation 'id.zelory:compressor:2.1.0' // 图片压缩
  128. //内存泄露
  129. debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7'
  130. // releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:2.7'
  131. // testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:2.7'
  132. implementation 'jsc.kit.wheel:wheel-view:0.5.4'
  133. implementation 'com.github.JessYanCoding:AndroidAutoSize:v1.2.1' //适配
  134. implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
  135. implementation 'androidx.core:core-ktx:1.3.1'
  136. implementation 'com.github.yellowcath:VideoProcessor:2.3.0'
  137. }