build.gradle 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. apply plugin: 'com.android.library'
  2. apply plugin: 'kotlin-android'
  3. apply plugin: 'kotlin-android-extensions'
  4. apply plugin: 'kotlin-kapt'
  5. android {
  6. compileSdkVersion target_sdk_version
  7. buildToolsVersion build_tools_version
  8. defaultConfig {
  9. minSdkVersion min_sdk_version
  10. targetSdkVersion target_sdk_version
  11. versionCode app_version_code
  12. versionName app_version
  13. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  14. multiDexEnabled true
  15. dataBinding {
  16. enabled = true
  17. }
  18. ndk{
  19. //moduleName "JavaShopCommonNDK" //生成的so文件名字,调用C程序的代码中会用到该名字
  20. abiFilters "armeabi-v7a"
  21. }
  22. }
  23. lintOptions {
  24. abortOnError false
  25. }
  26. buildTypes {
  27. release {
  28. minifyEnabled false
  29. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  30. }
  31. // debug {
  32. // jniDebuggable true
  33. // }
  34. }
  35. sourceSets {
  36. main.java.srcDirs += 'src/main/code'
  37. main.jniLibs.srcDirs = ['libs']
  38. // main.jni.srcDirs = []
  39. // main.jniLibs.srcDir 'src/main/libs'
  40. }
  41. //指定libs
  42. repositories {
  43. flatDir {
  44. dirs 'libs'
  45. }
  46. }
  47. compileOptions {
  48. sourceCompatibility JavaVersion.VERSION_1_8
  49. targetCompatibility JavaVersion.VERSION_1_8
  50. }
  51. }
  52. dependencies {
  53. compile fileTree(include: ['*.jar'], dir: 'libs')
  54. /**
  55. * Android基础依赖库
  56. */
  57. implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
  58. implementation 'androidx.core:core-ktx:1.3.1'
  59. // implementation 'androidx.appcompat:appcompat:1.2.0'
  60. implementation 'androidx.appcompat:appcompat:1.3.0-alpha02'
  61. implementation 'com.google.android.material:material:1.2.1'
  62. //testImplementation 'junit:junit:4.+'
  63. androidTestImplementation 'androidx.test.ext:junit:1.1.2'
  64. androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  65. /**
  66. * UI适配
  67. */
  68. compile 'me.jessyan:autosize:1.2.1'
  69. /**
  70. * 圆形ImageView
  71. */
  72. compile 'de.hdodenhof:circleimageview:2.2.0'
  73. /**
  74. * JavaShop_Android 基础工具库
  75. */
  76. compile 'com.enation.geamtear.util:base:1.1.4'
  77. /**
  78. * JavaShop_Android 网络库
  79. */
  80. compile 'com.enation.geamtear.net:engine:1.1.5'
  81. /**
  82. * JavaShop_Android 图片加载库
  83. */
  84. compile 'com.enation.geamtear.image:glidepluin:1.0.2'
  85. /**
  86. * JavaShop_Android 第三方工具库
  87. */
  88. compile 'com.enation.geamtear.widget:ConnectView:1.1.1'
  89. /**
  90. * JavaShop_Android 地区选择工具库
  91. */
  92. compile 'com.enation.geamtear.widget:districtselectorview:1.0.6'
  93. /**
  94. * JavaShop_Android 导航View
  95. */
  96. compile 'com.enation.geamtear.widget:NavigationView:1.1.0'
  97. /**
  98. * JavaShop_Android 路由
  99. */
  100. compile 'com.enation.geamtear:jrouter-logic:1.0.3'
  101. compile 'com.enation.geamtear:jrouter-annotation:1.0.1'
  102. /**
  103. * JavaShop_Android 图片选择工具库
  104. */
  105. compile('com.enation.geamtear.photo:takephoto:1.0.2') {
  106. exclude group: 'com.github.bumptech.glide'
  107. exclude group: 'io.reactivex.rxjava2'
  108. }
  109. /**
  110. * JavaShop_Android Log日志库
  111. */
  112. compile 'com.enation.geamtear.util:logger:1.0.7'
  113. /**
  114. * 突破方法数限制
  115. */
  116. implementation("androidx.multidex:multidex:2.0.1")
  117. compile 'com.github.1002326270xc:LayoutManager-FlowLayout:v1.7'
  118. /**
  119. * 刷新数据控件
  120. */
  121. compile 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-alpha-18'
  122. /**
  123. * 动画框架 巨牛逼
  124. */
  125. compile 'com.airbnb.android:lottie:1.5.3'
  126. /**
  127. * Kotlin依赖
  128. */
  129. compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  130. compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.27.0'
  131. // /**
  132. // * Databinding
  133. // */
  134. // kapt "com.android.databinding:compiler:2.3.3"
  135. /**
  136. * Dagger依赖
  137. */
  138. compile 'com.google.dagger:dagger:2.7'
  139. /**
  140. * Dagger编译依赖
  141. */
  142. kapt 'com.google.dagger:dagger-compiler:2.7'
  143. /**
  144. * 七巧板框架
  145. */
  146. compile 'com.alibaba.android:tangram:2.0.0@aar'
  147. compile('com.alibaba.android:vlayout:1.2.6.1@aar')
  148. compile 'com.alibaba.android:ultraviewpager:1.0.6.5@aar'
  149. compile('me.everything:overscroll-decor-android:1.0.1@aar') {
  150. transitive true
  151. exclude group: 'com.android.support', module: 'recyclerview-v7'
  152. }
  153. compile('com.alibaba.android:virtualview:1.0.2@aar') {
  154. transitive true
  155. exclude group: 'com.android.support', module: 'appcompat-v7'
  156. exclude group: 'com.tmall.android', module: 'tmallandroid_mui'
  157. exclude group: 'com.google.android', module: 'support-v7-recyclerview'
  158. exclude group: 'com.android.support', module: 'support-v4'
  159. exclude group: 'com.android.support', module: 'support-annotations'
  160. }
  161. //compile 'com.alibaba.android:tangram:2.2.1@aar'
  162. /**
  163. * Aop埋点
  164. */
  165. compile "org.aspectj:aspectjrt:$aspectj_version"
  166. /**
  167. * constraint-layout布局依赖
  168. */
  169. implementation("androidx.constraintlayout:constraintlayout:2.1.4")
  170. /**
  171. * 指示器
  172. */
  173. compile 'com.github.hackware1993:magicindicator:1.5.0'
  174. /**
  175. * 汉字辅助
  176. */
  177. compile files('libs/chinese2py.jar')
  178. /**
  179. * 二维码扫描
  180. */
  181. compile 'cn.yipianfengye.android:zxing-library:2.2'
  182. /**
  183. * GLIDE 图片处理器
  184. */
  185. compile ('jp.wasabeef:glide-transformations:2.0.1') {
  186. exclude group: 'com.github.bumptech.glide'
  187. }
  188. /**
  189. * 时间选择器
  190. */
  191. compile 'com.contrarywind:Android-PickerView:4.1.6'
  192. /**
  193. * 图片查看器
  194. */
  195. compile 'com.github.iielse:ImageWatcher:1.1.5'
  196. /**
  197. * 权限控制
  198. */
  199. compile 'pub.devrel:easypermissions:0.2.0'
  200. compile 'com.github.pinguo-zhouwei:MZBannerView:v2.0.2'
  201. //okthttp
  202. //compile 'com.squareup.okhttp3:okhttp:3.10.0'
  203. //compile 'com.squareup.okio:okio:1.12.0'
  204. //eventbus
  205. compile 'org.greenrobot:eventbus:3.0.0'
  206. /**
  207. * netty
  208. */
  209. compile 'io.netty:netty-all:4.1.42.Final'
  210. //解决 引入上方库,Log4J2Logger报错的问题
  211. implementation 'org.apache.logging.log4j:log4j-core:2.7'
  212. implementation 'org.apache.logging.log4j:log4j-api:2.7'
  213. /**
  214. * json
  215. */
  216. compile 'com.alibaba:fastjson:1.2.23'
  217. /**
  218. * google
  219. */
  220. compile 'com.google.guava:guava:23.0'
  221. //linphone sip sdk
  222. api(name: 'linphone-sdk-android-5.2.10', ext: 'aar')
  223. // compile files('libs/linphone-sdk-android-5.2.10.aar')
  224. compile project(':resource')
  225. }
  226. //tasks.withType(JavaCompile) {
  227. // compileTask -> compileTask.dependsOn ndkBuild
  228. //}
  229. //
  230. //task ndkBuild(type: Exec) {
  231. // workingDir file('src/main/jni')
  232. // commandLine getNdkBuildCmd()
  233. //}
  234. //
  235. //task cleanNative(type: Exec){
  236. // workingDir file('src/main/jni')
  237. // commandLine getNdkBuildCmd(), 'clean'
  238. //}
  239. //
  240. //clean.dependsOn cleanNative
  241. //
  242. //def getNdkDir() {
  243. // if (System.env.ANDROID_NDK_ROOT != null)
  244. // return System.env.ANDROID_NDK_ROOT
  245. // Properties properties = new Properties()
  246. // properties.load(project.rootProject.file('local.properties').newDataInputStream())
  247. // def ndkdir = properties.getProperty('ndk.dir', null)
  248. // if (ndkdir == null)
  249. // throw new GradleException("NDK location not found. Define location with ndk.dir in the local.properties file or with an ANDROID_NDK_ROOT environment variable.")
  250. // return ndkdir
  251. //}
  252. //
  253. //def getNdkBuildCmd() {
  254. // def ndkbuild = getNdkDir() + "/ndk-build"
  255. // //Window下需要加.cmd后缀,Mac下则不需要
  256. // ndkbuild += ""
  257. // return ndkbuild
  258. //}