build.gradle 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. plugins {
  2. id 'com.android.application'
  3. id 'kotlin-android'
  4. id 'org.jetbrains.kotlin.kapt'
  5. id 'kotlin-parcelize'
  6. }
  7. android {
  8. compileSdkVersion 31
  9. // buildToolsVersion ANDROID_BUILD_TOOLS_VERSION
  10. defaultConfig {
  11. minSdkVersion 28
  12. targetSdkVersion 31
  13. versionCode SAGA_CODE.toInteger()
  14. versionName SAGA_ANDROID_VERSION
  15. testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
  16. vectorDrawables.useSupportLibrary = true
  17. multiDexEnabled true
  18. ndk {
  19. //选择要添加的对应cpu类型的.so库。
  20. // abiFilters 'arm64-v8a'
  21. abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64'
  22. // 还可以添加 abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a'
  23. }
  24. javaCompileOptions {
  25. annotationProcessorOptions {
  26. arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
  27. }
  28. }
  29. dataBinding {
  30. enabled true
  31. }
  32. }
  33. signingConfigs {
  34. release {
  35. storeFile file("persagy.keystore")
  36. storePassword "persagy"
  37. keyAlias "persagy"
  38. keyPassword "persagy"
  39. }
  40. debug {
  41. storeFile file("persagy.keystore")
  42. storePassword "persagy"
  43. keyAlias "persagy"
  44. keyPassword "persagy"
  45. }
  46. }
  47. buildTypes {
  48. release {
  49. // minifyEnabled false
  50. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  51. }
  52. }
  53. // 解决lint语法检查错误(kotlin语法无法通过lint)
  54. lintOptions {
  55. abortOnError false
  56. }
  57. kotlinOptions {
  58. jvmTarget = JVM_TARGET
  59. }
  60. packagingOptions {
  61. exclude 'META-INF/DEPENDENCIES.txt'
  62. exclude 'META-INF/LICENSE.txt'
  63. exclude 'META-INF/NOTICE.txt'
  64. exclude 'META-INF/NOTICE'
  65. exclude 'META-INF/LICENSE'
  66. exclude 'META-INF/DEPENDENCIES'
  67. exclude 'META-INF/notice.txt'
  68. exclude 'META-INF/license.txt'
  69. exclude 'META-INF/dependencies.txt'
  70. exclude 'META-INF/LGPL2.1'
  71. resources {
  72. excludes += '/META-INF/{AL2.0,LGPL2.1}'
  73. }
  74. }
  75. compileOptions {
  76. targetCompatibility JavaVersion.VERSION_1_8
  77. sourceCompatibility JavaVersion.VERSION_1_8
  78. }
  79. sourceSets {
  80. main {
  81. //jni库的调用会到资源文件夹下libs里面找so文件
  82. jniLibs.srcDirs = ['libs']
  83. }
  84. }
  85. configurations {
  86. cleanedAnnotations
  87. compile.exclude group: 'com.intellij', module: 'annotations'
  88. }
  89. buildFeatures {
  90. compose true
  91. }
  92. composeOptions {
  93. kotlinCompilerExtensionVersion "1.1.0-beta01"
  94. }
  95. }
  96. dependencies {
  97. implementation fileTree(dir: 'libs', include: ['*.jar'])
  98. implementation files('libs/zbardecoder.jar')
  99. implementation files('libs/universal-image-loader-1.9.4-with-sources.jar')
  100. implementation files('libs/httpclient-4.3.5.jar')
  101. implementation files('libs/httpcore-4.3.2.jar')
  102. implementation 'com.google.ar:core:1.25.0'
  103. implementation "androidx.compose.animation:animation:1.1.0-beta03"
  104. implementation "androidx.compose.compiler:compiler:1.1.0-beta03"
  105. implementation "androidx.compose.foundation:foundation:1.1.0-beta03"
  106. implementation "androidx.compose.runtime:runtime:1.1.0-beta03"
  107. implementation "androidx.compose.ui:ui:1.1.0-beta03"
  108. implementation 'androidx.compose.material:material:1.1.0-beta03'
  109. implementation "androidx.navigation:navigation-compose:2.4.0-beta02"
  110. implementation "androidx.compose.ui:ui-tooling-preview:1.1.0-beta03"
  111. implementation 'androidx.activity:activity-compose:1.3.1'
  112. implementation "androidx.constraintlayout:constraintlayout-compose:1.0.0-rc02"
  113. testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: JUNIT_VERSION
  114. androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
  115. exclude group: 'com.android.support', module: 'support-annotations'
  116. })
  117. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  118. // kotlin 依赖
  119. implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: KOTLIN_VERSION
  120. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  121. // android支持
  122. implementation 'androidx.core:core-ktx:1.6.0'
  123. implementation 'androidx.appcompat:appcompat:1.3.1'
  124. implementation 'com.google.android.material:material:1.4.0'
  125. implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  126. // implementation group: 'androidx.appcompat', name: 'appcompat', version: ANDROID_SUPPORT_VERSION
  127. // implementation group: 'com.google.android.material', name: 'material', version: ANDROID_SUPPORT_VERSION
  128. // implementation group: 'androidx.legacy', name: 'legacy-support-v4', version: ANDROID_SUPPORT_VERSION
  129. // implementation group: 'androidx.constraintlayout', name: 'constraintlayout', version: CONSTRAINT_VERSION
  130. implementation 'com.github.bumptech.glide:glide:4.0.0'
  131. implementation 'com.github.bumptech.glide:okhttp3-integration:4.0.0'
  132. androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.1.0-beta02"
  133. debugImplementation "androidx.compose.ui:ui-tooling:1.1.0-beta02"
  134. debugImplementation "androidx.compose.ui:ui-test-manifest:1.1.0-beta02"
  135. kapt 'com.github.bumptech.glide:compiler:4.0.0'
  136. implementation 'com.contrarywind:Android-PickerView:4.1.3'
  137. implementation 'com.bm.photoview:library:1.4.1'
  138. implementation 'com.yuyh.imgsel:library:1.3.8'
  139. implementation 'com.github.chrisbanes:PhotoView:1.2.6'
  140. implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0'
  141. implementation 'commons-logging:commons-logging:1.2'
  142. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  143. // anko依赖
  144. // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-commons
  145. implementation group: 'org.jetbrains.anko', name: 'anko-commons', version: ANKO_VERSION
  146. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  147. // 图片加载框架
  148. // https://mvnrepository.com/artifact/com.squareup.picasso/picasso
  149. implementation group: 'com.squareup.picasso', name: 'picasso', version: PICASSO_VERSION
  150. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  151. // anko依赖
  152. // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-common
  153. implementation group: 'org.jetbrains.anko', name: 'anko-common', version: ANKO_VERSION
  154. // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-sdk25
  155. implementation group: 'org.jetbrains.anko', name: 'anko-sdk25', version: ANKO_VERSION
  156. // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-appcompat-v7
  157. implementation group: 'org.jetbrains.anko', name: 'anko-appcompat-v7', version: ANKO_VERSION
  158. // https://mvnrepository.com/artifact/org.jetbrains.anko/anko-design
  159. implementation group: 'org.jetbrains.anko', name: 'anko-design', version: ANKO_VERSION
  160. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  161. // 运行时权限申请
  162. // https://mvnrepository.com/artifact/pub.devrel/easypermissions
  163. implementation group: 'pub.devrel', name: 'easypermissions', version: EASYPERMISSIONS_VERSION
  164. // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  165. // // 谷歌JSON解析
  166. // // https://mvnrepository.com/artifact/com.google.code.gson/gson
  167. // implementation group: 'com.google.code.gson', name: 'gson', version: GSON_VERSION
  168. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  169. // JSON解析
  170. // https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
  171. implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: JACKSON_VERSION
  172. // https://mvnrepository.com/artifact/org.greenrobot/eventbus
  173. implementation group: 'org.greenrobot', name: 'eventbus', version: EVENTBUS_VERSION
  174. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  175. // https://mvnrepository.com/artifact/javax.persistence/persistence-api
  176. implementation group: "javax.persistence", name: "persistence-api", version: PERSISTENCE_VERSION
  177. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  178. // 二维码与条形码
  179. // https://mvnrepository.com/artifact/com.google.zxing/core
  180. implementation group: 'com.google.zxing', name: 'core', version: ZXING_VERSION
  181. // https://mvnrepository.com/artifact/com.google.zxing/android-core
  182. implementation group: 'com.google.zxing', name: 'android-core', version: ZXING_VERSION
  183. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  184. // Sybotan依赖
  185. implementation group: 'cn.sagacloud', name: 'saga-kotlin-base', version: SAGA_KOTLIN_VERSION
  186. implementation project(':sybotan-android-base')
  187. implementation project(':sybotan-android-database')
  188. // implementation project(':sybotan-android-devices')
  189. // implementation project(':sybotan-android-views')
  190. implementation project(':sybotan-android-graphy')
  191. // implementation project(':sybotan-android-works')
  192. implementation project(':cadengine')
  193. // Sybotan依赖
  194. implementation group: 'cn.sagacloud', name: 'saga-kotlin-database', version: SAGA_KOTLIN_VERSION
  195. // implementation group: 'cn.sagacloud', name: 'sybotan-android-base', version: SYBOTAN_ANDROID_VERSION
  196. // implementation group: 'cn.sagacloud', name: 'sybotan-android-graphy', version: SYBOTAN_ANDROID_VERSION
  197. implementation 'androidx.multidex:multidex:2.0.1'
  198. implementation 'io.reactivex.rxjava2:rxjava:2.2.9'
  199. implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
  200. implementation 'com.trello.rxlifecycle2:rxlifecycle:2.2.1'
  201. implementation 'com.trello.rxlifecycle2:rxlifecycle-android:2.2.1'
  202. implementation 'com.trello.rxlifecycle2:rxlifecycle-components:2.2.1'
  203. implementation 'com.squareup.retrofit2:retrofit:2.9.0'
  204. implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
  205. implementation 'com.squareup.retrofit2:adapter-rxjava2:2.9.0'
  206. implementation 'org.kodein.di:kodein-di:7.9.0'
  207. //implementation 'org.kodein.di:kodein-di-framework-android-support:7.8.0'
  208. implementation 'org.kodein.di:kodein-di-framework-android-core:7.9.0'
  209. implementation 'org.kodein.di:kodein-di-framework-android-x:7.9.0'
  210. implementation 'org.kodein.di:kodein-di-framework-android-x-viewmodel:7.9.0'
  211. implementation 'org.kodein.di:kodein-di-framework-compose:7.9.0'
  212. implementation 'com.arashivision.sdk:sdkcamera:1.3.10'
  213. implementation 'com.arashivision.sdk:sdkmedia:1.3.10'
  214. implementation 'com.lzy.net:okgo:3.0.4'
  215. implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
  216. androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
  217. exclude group: 'com.android.support', module: 'support-annotations'
  218. })
  219. // room
  220. implementation('androidx.room:room-runtime:2.4.0-alpha05', {
  221. exclude group: 'com.intellij', module: 'annotations'
  222. })
  223. kapt('androidx.room:room-compiler:2.4.0-alpha05', {
  224. exclude group: 'com.intellij', module: 'annotations'
  225. })
  226. implementation('androidx.room:room-ktx:2.4.0-alpha05', {
  227. exclude group: 'com.intellij', module: 'annotations'
  228. })
  229. // lifecycle
  230. implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.0'
  231. implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.0'
  232. implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0'
  233. implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.4.0'
  234. implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2'
  235. debugImplementation 'com.amitshekhar.android:debug-db:1.0.4'
  236. //屏幕适配
  237. // implementation 'me.jessyan:autosize:1.2.1'
  238. implementation 'com.rm:rmswitch:1.2.2'
  239. androidTestImplementation("androidx.test.ext:junit:1.1.3")
  240. androidTestImplementation("androidx.test.ext:junit-ktx:1.1.3")
  241. testImplementation("junit:junit:4.13.2")
  242. implementation 'cn.hutool:hutool-all:5.4.7'
  243. implementation group: 'org.locationtech.jts', name: 'jts-core', version: '1.16.1'
  244. }