build.gradle 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'org.greenrobot.greendao'
  3. apply plugin: 'kotlin-android' //加上插件
  4. android {
  5. compileSdkVersion versionCompiler
  6. buildToolsVersion versionBuildTool
  7. compileOptions.encoding = 'UTF-8'
  8. useLibrary 'org.apache.http.legacy'
  9. compileOptions {
  10. sourceCompatibility javaSourceCompatibility
  11. targetCompatibility javaTargetCompatibility
  12. }
  13. /*signingConfigs {
  14. sginconfig {
  15. keyAlias 'platform'
  16. keyPassword 'android'
  17. storeFile file('debug.keystore')
  18. storePassword 'android'
  19. }
  20. }*/
  21. defaultConfig {
  22. applicationId "com.kyen.imagedetection"
  23. minSdkVersion 21
  24. targetSdkVersion versionTarget
  25. versionCode 50
  26. versionName "1.50"
  27. testInstrumentationRunner "android.support.intToByteZF.runner.AndroidJUnitRunner"
  28. multiDexEnabled true
  29. resConfigs 'en', 'cn'
  30. ndk {
  31. abiFilters "armeabi", "armeabi-v7a"
  32. }
  33. }
  34. dexOptions {
  35. incremental true
  36. javaMaxHeapSize "4g"
  37. }
  38. buildTypes {
  39. release {
  40. //signingConfig signingConfigs.sginconfig
  41. minifyEnabled false
  42. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  43. }
  44. debug {
  45. //signingConfig signingConfigs.sginconfig
  46. debuggable true
  47. jniDebuggable false
  48. renderscriptDebuggable false
  49. minifyEnabled false
  50. zipAlignEnabled true
  51. }
  52. }
  53. allprojects {
  54. repositories {
  55. maven { url 'https://jitpack.io' }
  56. }
  57. }
  58. lintOptions {
  59. // checkReleaseBuilds false
  60. abortOnError false
  61. }
  62. sourceSets {
  63. main {
  64. //jniLibs.srcDirs = ['libs']
  65. jni.srcDirs = []//禁止自动执行ndk-build
  66. jniLibs.srcDir 'src/main/libs'
  67. //修改
  68. // jniLibs.srcDirs = ['libs']
  69. }
  70. }
  71. packagingOptions {
  72. pickFirst 'lib/armeabi-v7a/libopencv_java4.so'
  73. doNotStrip "*/*/libsnpe_dsp_v65_domains_skel.so"
  74. doNotStrip "*/*/libsnpe_dsp_skel.so"
  75. doNotStrip "*/*/libsnpe_dsp_domains_skel.so"
  76. }
  77. aaptOptions {
  78. noCompress "tflite"
  79. //表示不让aapt压缩的文件后缀//相关文档https://blog.csdn.net/aiynmimi/article/details/89188874
  80. }
  81. }
  82. dependencies {
  83. implementation fileTree(include: ['*.jar'], dir: 'libs')
  84. // implementation(name: 'update-release', ext: 'aar')//rtmp实时视频
  85. implementation 'org.xutils:xutils:3.3.34'
  86. implementation 'com.github.yangjie10930:EpMedia:v0.9.5'
  87. implementation 'com.google.guava:guava:17.0'
  88. implementation project(':camera_ui')
  89. implementation files('libs/easyedge-sdk.jar')
  90. implementation "com.android.support:support-v4:${supportLibVersion}"
  91. implementation "com.android.support:support-annotations:${supportLibVersion}"
  92. implementation("com.serenegiant:common:${commonLibVersion}") {
  93. exclude module: 'support-v4'
  94. }
  95. implementation project(':libusbcamera')
  96. implementation project(':AI_FangWaiPo')//引入防外破识别
  97. implementation project(path: ':sdk')
  98. implementation project(path: ':ai_snow_covered')//引入ai覆冰
  99. // 串口
  100. // implementation 'com.github.licheedev.Android-SerialPort-API:serialport:1.0.1'
  101. implementation 'com.licheedev:android-serialport:2.1.1'
  102. // implementation 'com.github.licheedev:Android-SerialPort-API:2.0.0'
  103. // implementation 'com.licheedev:android-serialport:2.1.5'
  104. ///////////////////////////////
  105. implementation 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.4@aar'
  106. implementation 'io.reactivex.rxjava2:rxjava:2.0.8'
  107. implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
  108. ////////rtmp实时视频
  109. implementation "com.squareup.retrofit2:retrofit:2.9.0"
  110. implementation "com.squareup.retrofit2:retrofit-mock:2.7.2"
  111. implementation "com.squareup.retrofit2:converter-gson:2.7.2"
  112. implementation "com.squareup.retrofit2:adapter-rxjava2:2.7.2"
  113. implementation "com.squareup.retrofit2:converter-gson:2.2.0"
  114. //implementation 'com.google.code.gson:gson:2.7.2'
  115. // Gson库
  116. implementation "com.google.code.gson:gson:2.6"
  117. implementation 'com.squareup.okhttp3:okhttp:4.2.2'
  118. implementation 'com.squareup:otto:1.3.8'
  119. implementation 'com.github.bumptech.glide:glide:3.7.0'
  120. implementation 'com.android.support:multidex:1.0.1'
  121. implementation 'com.alibaba:fastjson:1.2.58'
  122. implementation files('libs/javacsv.jar')
  123. //日志打印
  124. implementation('com.squareup.okhttp3:logging-interceptor:3.4.1')
  125. implementation 'org.conscrypt:conscrypt-android:2.2.1'
  126. implementation project(path: ':library')
  127. implementation project(':pedrovlc')
  128. implementation project(':onvifcamera')
  129. // implementation project(path: ':gb28181library')
  130. implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
  131. implementation "com.android.support:support-annotations:${supportLibVersion}"
  132. testImplementation 'junit:junit:4.12'
  133. androidTestImplementation 'androidx.test.ext:junit:1.1.1'
  134. implementation 'org.joml:joml:1.10.1' // 确保使用最新的版本
  135. configurations {
  136. all*.exclude group: 'com.google.code.gson'
  137. }
  138. }
  139. repositories {
  140. mavenCentral()
  141. }