build.gradle 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. /*
  2. * ********************************************************************************************************************
  3. *
  4. * iFHS7.
  5. * ;BBMBMBMc rZMBMBR BMB
  6. * MBEr:;PBM, 7MBMMEOBB: BBB RBW
  7. * XK: BO SB. :SZ MBM. c;; ir BBM :FFr :SSF: ;xBMB:r iuGXv. i:. iF2;
  8. * DBBM0r. :D S7 ;XMBMB GMBMu. MBM: BMB MBMBBBMBMS WMBMBMBBK MBMBMBM BMBRBMBW .MBMBMBMBB
  9. * :JMRMMD .. , 1MMRM1; ;MBMBBR: MBM ;MB: BMB: MBM. RMBr sBMH BM0 UMB, BMB. KMBv
  10. * ;. XOW B1; :uM: 1RE, i .2BMBs rMB. MBO MBO JMB; MBB MBM BBS 7MBMBOBM: MBW :BMc
  11. * OBRJ.SEE MRDOWOR, 3DE:7OBM . ;BMB RMR7BM BMB MBB. BMB ,BMR .BBZ MMB rMB, BMM rMB7
  12. * :FBRO0D0 RKXSXPR. JOKOOMPi BMBSSWBMB; BMBB: MBMB0ZMBMS .BMBOXRBMB MBMDE RBM2;SMBM; MBB xBM2
  13. * iZGE O0SHSPO. uGZ7. sBMBMBDL :BMO OZu:BMBK, rRBMB0; ,EBMB xBMBr:ER. RDU :OO;
  14. * ,BZ, 1D0 RPSFHXR. xWZ .SMr . .BBB
  15. * :0BMRDG RESSSKR. 2WOMBW; BMBMR
  16. * i0BM: SWKHKGO MBDv
  17. * .UB OOGDM. MK, Copyright (c) 2015-2019. 斯伯坦机器人
  18. * , XMW ..
  19. * r All rights reserved.
  20. *
  21. * ********************************************************************************************************************
  22. */
  23. /*apply plugin: 'com.android.application'
  24. apply plugin: 'kotlin-android'
  25. apply plugin: 'kotlin-android-extensions'*/
  26. plugins {
  27. id 'com.android.application'
  28. id 'kotlin-android'
  29. /// id 'kotlin-android-extensions'
  30. // kotlin("kapt")
  31. id 'org.jetbrains.kotlin.kapt'
  32. id 'kotlin-parcelize'
  33. id 'org.jetbrains.kotlin.plugin.serialization' version '1.5.31'
  34. }
  35. android {
  36. compileSdkVersion 31
  37. // buildToolsVersion ANDROID_BUILD_TOOLS_VERSION
  38. defaultConfig {
  39. minSdkVersion 28
  40. targetSdkVersion 31
  41. versionCode SAGA_CODE.toInteger()
  42. versionName SAGA_ANDROID_VERSION
  43. testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
  44. vectorDrawables.useSupportLibrary = true
  45. multiDexEnabled true
  46. ndk {
  47. //选择要添加的对应cpu类型的.so库。
  48. abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64'
  49. // 还可以添加 abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a'
  50. }
  51. javaCompileOptions {
  52. annotationProcessorOptions {
  53. arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
  54. }
  55. }
  56. }
  57. signingConfigs {
  58. release {
  59. storeFile file("persagy.keystore")
  60. storePassword "persagy"
  61. keyAlias "persagy"
  62. keyPassword "persagy"
  63. }
  64. debug {
  65. storeFile file("persagy.keystore")
  66. storePassword "persagy"
  67. keyAlias "persagy"
  68. keyPassword "persagy"
  69. }
  70. }
  71. buildTypes {
  72. release {
  73. // minifyEnabled false
  74. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  75. }
  76. }
  77. // 解决lint语法检查错误(kotlin语法无法通过lint)
  78. lintOptions {
  79. abortOnError false
  80. }
  81. kotlinOptions {
  82. jvmTarget = JVM_TARGET
  83. }
  84. packagingOptions {
  85. exclude 'META-INF/DEPENDENCIES.txt'
  86. exclude 'META-INF/LICENSE.txt'
  87. exclude 'META-INF/NOTICE.txt'
  88. exclude 'META-INF/NOTICE'
  89. exclude 'META-INF/LICENSE'
  90. exclude 'META-INF/DEPENDENCIES'
  91. exclude 'META-INF/notice.txt'
  92. exclude 'META-INF/license.txt'
  93. exclude 'META-INF/dependencies.txt'
  94. exclude 'META-INF/LGPL2.1'
  95. }
  96. compileOptions {
  97. targetCompatibility JavaVersion.VERSION_1_8
  98. sourceCompatibility JavaVersion.VERSION_1_8
  99. }
  100. sourceSets {
  101. main {
  102. //jni库的调用会到资源文件夹下libs里面找so文件
  103. jniLibs.srcDirs = ['libs']
  104. }
  105. }
  106. configurations {
  107. cleanedAnnotations
  108. compile.exclude group: 'com.intellij', module: 'annotations'
  109. }
  110. }
  111. dependencies {
  112. implementation fileTree(dir: 'libs', include: ['*.jar'])
  113. implementation files('libs/zbardecoder.jar')
  114. implementation files('libs/universal-image-loader-1.9.4-with-sources.jar')
  115. implementation files('libs/httpclient-4.3.5.jar')
  116. implementation files('libs/httpcore-4.3.2.jar')
  117. implementation 'com.google.ar:core:1.23.0'
  118. testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: JUNIT_VERSION
  119. androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
  120. exclude group: 'com.android.support', module: 'support-annotations'
  121. })
  122. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  123. // kotlin 依赖
  124. implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: KOTLIN_VERSION
  125. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  126. // android支持
  127. implementation 'androidx.core:core-ktx:1.5.0'
  128. implementation 'androidx.appcompat:appcompat:1.3.1'
  129. implementation 'com.google.android.material:material:1.3.0'
  130. implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  131. // implementation group: 'androidx.appcompat', name: 'appcompat', version: ANDROID_SUPPORT_VERSION
  132. // implementation group: 'com.google.android.material', name: 'material', version: ANDROID_SUPPORT_VERSION
  133. // implementation group: 'androidx.legacy', name: 'legacy-support-v4', version: ANDROID_SUPPORT_VERSION
  134. // implementation group: 'androidx.constraintlayout', name: 'constraintlayout', version: CONSTRAINT_VERSION
  135. implementation 'com.github.bumptech.glide:glide:4.0.0'
  136. implementation 'com.github.bumptech.glide:okhttp3-integration:4.0.0'
  137. kapt 'com.github.bumptech.glide:compiler:4.0.0'
  138. implementation 'com.contrarywind:Android-PickerView:4.1.3'
  139. implementation 'com.bm.photoview:library:1.4.1'
  140. implementation 'com.yuyh.imgsel:library:1.3.8'
  141. implementation 'com.github.chrisbanes:PhotoView:1.2.6'
  142. implementation 'com.squareup.okhttp3:logging-interceptor:3.1.2'
  143. implementation 'commons-logging:commons-logging:1.2'
  144. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  145. // anko依赖
  146. // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-commons
  147. implementation group: 'org.jetbrains.anko', name: 'anko-commons', version: ANKO_VERSION
  148. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  149. // 图片加载框架
  150. // https://mvnrepository.com/artifact/com.squareup.picasso/picasso
  151. implementation group: 'com.squareup.picasso', name: 'picasso', version: PICASSO_VERSION
  152. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  153. // anko依赖
  154. // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-common
  155. implementation group: 'org.jetbrains.anko', name: 'anko-common', version: ANKO_VERSION
  156. // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-sdk25
  157. implementation group: 'org.jetbrains.anko', name: 'anko-sdk25', version: ANKO_VERSION
  158. // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-appcompat-v7
  159. implementation group: 'org.jetbrains.anko', name: 'anko-appcompat-v7', version: ANKO_VERSION
  160. // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-design
  161. implementation group: 'org.jetbrains.anko', name: 'anko-design', version: ANKO_VERSION
  162. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  163. // 运行时权限申请
  164. // https://mvnrepository.com/artifact/pub.devrel/easypermissions
  165. implementation group: 'pub.devrel', name: 'easypermissions', version: EASYPERMISSIONS_VERSION
  166. // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  167. // // 谷歌JSON解析
  168. // // https://mvnrepository.com/artifact/com.google.code.gson/gson
  169. // implementation group: 'com.google.code.gson', name: 'gson', version: GSON_VERSION
  170. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  171. // JSON解析
  172. // https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
  173. implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: JACKSON_VERSION
  174. // https://mvnrepository.com/artifact/org.greenrobot/eventbus
  175. implementation group: 'org.greenrobot', name: 'eventbus', version: EVENTBUS_VERSION
  176. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  177. // https://mvnrepository.com/artifact/javax.persistence/persistence-api
  178. implementation group: "javax.persistence", name: "persistence-api", version: PERSISTENCE_VERSION
  179. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  180. // 二维码与条形码
  181. // https://mvnrepository.com/artifact/com.google.zxing/core
  182. implementation group: 'com.google.zxing', name: 'core', version: ZXING_VERSION
  183. // https://mvnrepository.com/artifact/com.google.zxing/android-core
  184. implementation group: 'com.google.zxing', name: 'android-core', version: ZXING_VERSION
  185. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  186. // Sybotan依赖
  187. implementation group: 'cn.sagacloud', name: 'saga-kotlin-base', version: SAGA_KOTLIN_VERSION
  188. implementation project(':sybotan-android-base')
  189. implementation project(':sybotan-android-database')
  190. // implementation project(':sybotan-android-devices')
  191. // implementation project(':sybotan-android-views')
  192. implementation project(':sybotan-android-graphy')
  193. // implementation project(':sybotan-android-works')
  194. implementation project(':cadengine')
  195. // Sybotan依赖
  196. implementation group: 'cn.sagacloud', name: 'saga-kotlin-database', version: SAGA_KOTLIN_VERSION
  197. // implementation group: 'cn.sagacloud', name: 'sybotan-android-base', version: SYBOTAN_ANDROID_VERSION
  198. // implementation group: 'cn.sagacloud', name: 'sybotan-android-graphy', version: SYBOTAN_ANDROID_VERSION
  199. implementation 'androidx.multidex:multidex:2.0.1'
  200. implementation 'io.reactivex.rxjava2:rxjava:2.2.9'
  201. implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
  202. implementation 'com.trello.rxlifecycle2:rxlifecycle:2.2.1'
  203. implementation 'com.trello.rxlifecycle2:rxlifecycle-android:2.2.1'
  204. implementation 'com.trello.rxlifecycle2:rxlifecycle-components:2.2.1'
  205. implementation 'com.squareup.retrofit2:retrofit:2.9.0'
  206. implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
  207. implementation 'com.squareup.retrofit2:adapter-rxjava2:2.9.0'
  208. implementation 'org.kodein.di:kodein-di:7.8.0'
  209. //implementation 'org.kodein.di:kodein-di-framework-android-support:7.8.0'
  210. implementation 'org.kodein.di:kodein-di-framework-android-core:7.8.0'
  211. implementation 'org.kodein.di:kodein-di-framework-android-x:7.8.0'
  212. implementation 'org.kodein.di:kodein-di-framework-android-x-viewmodel:7.8.0'
  213. // kotlin
  214. implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.0'
  215. implementation 'com.arashivision.sdk:sdkcamera:1.3.10'
  216. implementation 'com.arashivision.sdk:sdkmedia:1.3.10'
  217. implementation 'com.lzy.net:okgo:3.0.4'
  218. implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
  219. androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
  220. exclude group: 'com.android.support', module: 'support-annotations'
  221. })
  222. // room
  223. implementation('androidx.room:room-runtime:2.4.0-alpha05', {
  224. exclude group: 'com.intellij', module: 'annotations'
  225. })
  226. kapt('androidx.room:room-compiler:2.4.0-alpha05', {
  227. exclude group: 'com.intellij', module: 'annotations'
  228. })
  229. implementation('androidx.room:room-ktx:2.4.0-alpha05', {
  230. exclude group: 'com.intellij', module: 'annotations'
  231. })
  232. // lifecycle
  233. implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.0-rc01'
  234. implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.0-rc01'
  235. implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0-rc01'
  236. implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0'
  237. implementation 'com.squareup.okhttp3:logging-interceptor:3.14.4'
  238. debugImplementation 'com.amitshekhar.android:debug-db:1.0.4'
  239. //屏幕适配
  240. implementation 'me.jessyan:autosize:1.2.1'
  241. }