build.gradle 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. plugins {
  2. id 'com.android.application'
  3. id 'kotlin-android'
  4. }
  5. android {
  6. compileSdk 34
  7. defaultConfig {
  8. applicationId "com.dlc.eboard"
  9. minSdkVersion 21
  10. targetSdkVersion 34
  11. versionCode 12
  12. versionName "1.1.2-alpha-kuangda"
  13. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  14. ndk {
  15. abiFilters "armeabi-v7a"/*, "arm64-v8a", "x86"*/
  16. }
  17. }
  18. signingConfigs {
  19. signing {
  20. keyAlias 'winds'
  21. keyPassword '039468'
  22. storeFile file('../config/winds.jks')
  23. storePassword '039468'
  24. }
  25. }
  26. buildTypes {
  27. debug {
  28. packagingOptions {
  29. doNotStrip '**/*.so' // controlled by OpenCV CMake scripts
  30. }
  31. minifyEnabled false
  32. multiDexEnabled true
  33. signingConfig signingConfigs.signing
  34. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  35. }
  36. release {
  37. packagingOptions {
  38. doNotStrip '**/*.so' // controlled by OpenCV CMake scripts
  39. }
  40. // minifyEnabled true
  41. // multiDexEnabled true
  42. // signingConfig signingConfigs.signing
  43. // proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  44. }
  45. }
  46. compileOptions {
  47. sourceCompatibility JavaVersion.VERSION_17
  48. targetCompatibility JavaVersion.VERSION_17
  49. }
  50. kotlinOptions {
  51. jvmTarget = '17'
  52. }
  53. // kotlin {
  54. // experimental {
  55. // coroutines 'enable'
  56. // }
  57. // }
  58. viewBinding {
  59. enabled = true
  60. }
  61. repositories {
  62. flatDir {
  63. dirs 'libs'
  64. }
  65. }
  66. namespace 'com.dlc.eboard'
  67. applicationVariants.all { variant ->
  68. // variant.getPackageApplication().outputDirectory = new File("${rootDir.absolutePath}/Apk")
  69. variant.outputs.all {
  70. def buildType = variant.buildType.name
  71. def buildTime = new Date().format("yyyyMMddHHmm", TimeZone.getDefault())
  72. outputFileName = "Eboard_${buildType}_v${variant.versionCode}_${variant.versionName}_${buildTime}release.apk"
  73. }
  74. }
  75. }
  76. dependencies {
  77. implementation fileTree(dir: 'libs', include: ['*.jar'])
  78. implementation project(':HttpCoreLibrary')
  79. implementation project(':RcCore')
  80. implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.0"
  81. implementation "androidx.core:core-ktx:1.3.1"
  82. implementation "androidx.appcompat:appcompat:1.2.0"
  83. implementation "androidx.constraintlayout:constraintlayout:2.0.1"
  84. implementation "com.google.android.material:material:1.2.1"
  85. implementation "androidx.localbroadcastmanager:localbroadcastmanager:1.0.0"
  86. implementation "com.github.tbruyelle:rxpermissions:0.11"
  87. implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
  88. implementation "com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4"
  89. implementation "com.github.bumptech.glide:glide:4.11.0"
  90. implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7"
  91. implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.1"
  92. implementation "com.android.support:multidex:1.0.3"
  93. implementation "com.tencent.bugly:crashreport:3.4.4"
  94. implementation "com.tencent.bugly:nativecrashreport:3.9.2"
  95. implementation "org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.0"
  96. implementation "org.greenrobot:eventbus:3.2.0"
  97. implementation "com.github.bingoogolapple.BGAQRCode-Android:zxing:1.3.8"
  98. implementation "com.joanzapata.pdfview:android-pdfview:1.0.4@aar"
  99. implementation 'androidx.activity:activity:1.8.0'
  100. implementation files('libs\\smdt.jar')
  101. implementation project(':opencv')
  102. // CameraX core library using the camera2 implementation
  103. def camerax_version = "1.4.0-rc01"
  104. // The following line is optional, as the core library is included indirectly by camera-camera2
  105. implementation "androidx.camera:camera-core:${camerax_version}"
  106. implementation "androidx.camera:camera-camera2:${camerax_version}"
  107. // If you want to additionally use the CameraX Lifecycle library
  108. implementation "androidx.camera:camera-lifecycle:${camerax_version}"
  109. // If you want to additionally use the CameraX VideoCapture library
  110. implementation "androidx.camera:camera-video:${camerax_version}"
  111. // If you want to additionally use the CameraX View class
  112. implementation "androidx.camera:camera-view:${camerax_version}"
  113. // If you want to additionally add CameraX ML Kit Vision Integration
  114. implementation "androidx.camera:camera-mlkit-vision:${camerax_version}"
  115. // If you want to additionally use the CameraX Extensions library
  116. implementation "androidx.camera:camera-extensions:${camerax_version}"
  117. // implementation "com.squareup.leakcanary:leakcanary-android:2.14"
  118. implementation "com.github.NodeMedia:NodeMediaClient-Android:2.9.23"
  119. implementation(name: 'facedetector-1.0.0', ext: 'aar')
  120. implementation 'io.fotoapparat:fotoapparat:2.7.0'
  121. implementation(name: 'flowlayout-1.0.0', ext: 'aar')
  122. implementation 'com.blankj:utilcodex:1.31.1'
  123. // implementation 'com.google.mlkit:face-detection:16.1.7'
  124. // implementation 'com.otaliastudios:cameraview:2.7.2'
  125. //公共库 (*必须)
  126. implementation 'com.github.jenly1314.MLKit:mlkit-common:2.2.1'
  127. //条码识别 (可选)
  128. implementation 'com.github.jenly1314.MLKit:mlkit-barcode-scanning:2.2.1'
  129. //人脸检测 (可选)
  130. implementation 'com.github.jenly1314.MLKit:mlkit-face-detection:2.2.1'
  131. // opencv
  132. // implementation 'com.quickbirdstudios:opencv:3.4.15'
  133. }