build.gradle 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  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. dataBinding {
  15. enabled = true
  16. }
  17. // ndk{
  18. // moduleName "JavaShopCommonNDK" //生成的so文件名字,调用C程序的代码中会用到该名字
  19. // abiFilters "armeabi", "armeabi-v7a", "x86" //输出指定三种平台下的so库
  20. // }
  21. }
  22. lintOptions {
  23. abortOnError false
  24. }
  25. buildTypes {
  26. release {
  27. minifyEnabled false
  28. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  29. }
  30. // debug {
  31. // jniDebuggable true
  32. // }
  33. }
  34. sourceSets {
  35. main.java.srcDirs += 'src/main/code'
  36. // main.jni.srcDirs = []
  37. // main.jniLibs.srcDir 'src/main/libs'
  38. }
  39. }
  40. dependencies {
  41. compile fileTree(include: ['*.jar'], dir: 'libs')
  42. androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
  43. exclude group: 'com.android.support', module: 'support-annotations'
  44. })
  45. /**
  46. * UI适配
  47. */
  48. //暂时去掉今日头条适配方案 和RTC冲突
  49. // compile 'me.jessyan:autosize:1.1.1'
  50. /**
  51. * 圆形ImageView
  52. */
  53. compile 'de.hdodenhof:circleimageview:2.2.0'
  54. /**
  55. * JavaShop_Android 基础工具库
  56. */
  57. compile 'com.enation.geamtear.util:base:1.1.4'
  58. /**
  59. * JavaShop_Android 网络库
  60. */
  61. compile 'com.enation.geamtear.net:engine:1.1.5'
  62. /**
  63. * JavaShop_Android 图片加载库
  64. */
  65. compile 'com.enation.geamtear.image:glidepluin:1.0.2'
  66. /**
  67. * JavaShop_Android 第三方工具库
  68. */
  69. compile 'com.enation.geamtear.widget:ConnectView:1.1.1'
  70. /**
  71. * JavaShop_Android 地区选择工具库
  72. */
  73. compile 'com.enation.geamtear.widget:districtselectorview:1.0.6'
  74. /**
  75. * JavaShop_Android 导航View
  76. */
  77. compile 'com.enation.geamtear.widget:NavigationView:1.1.0'
  78. /**
  79. * JavaShop_Android 路由
  80. */
  81. compile 'com.enation.geamtear:jrouter-logic:1.0.3'
  82. /**
  83. * JavaShop_Android 图片选择工具库
  84. */
  85. compile('com.enation.geamtear.photo:takephoto:1.0.2') {
  86. exclude group: 'com.github.bumptech.glide'
  87. exclude group: 'io.reactivex.rxjava2'
  88. }
  89. /**
  90. * JavaShop_Android Log日志库
  91. */
  92. compile 'com.enation.geamtear.util:logger:1.0.7'
  93. /**
  94. * Android基础依赖库
  95. */
  96. compile "com.android.support:design:$support_library_version"
  97. compile "com.android.support:support-v4:$support_library_version"
  98. compile "com.android.support:cardview-v7:$support_library_version"
  99. testCompile 'junit:junit:4.12'
  100. /**
  101. * 突破方法数限制
  102. */
  103. compile 'com.android.support:multidex:1.0.2'
  104. compile 'com.github.1002326270xc:LayoutManager-FlowLayout:v1.7'
  105. /**
  106. * 刷新数据控件
  107. */
  108. compile 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-alpha-18'
  109. /**
  110. * 动画框架 巨牛逼
  111. */
  112. compile 'com.airbnb.android:lottie:1.5.3'
  113. /**
  114. * Kotlin依赖
  115. */
  116. compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  117. compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.27.0'
  118. /**
  119. * Databinding
  120. */
  121. kapt "com.android.databinding:compiler:2.3.3"
  122. /**
  123. * Dagger依赖
  124. */
  125. compile 'com.google.dagger:dagger:2.7'
  126. /**
  127. * Dagger编译依赖
  128. */
  129. kapt 'com.google.dagger:dagger-compiler:2.7'
  130. /**
  131. * 七巧板框架
  132. */
  133. compile 'com.alibaba.android:tangram:2.0.0@aar'
  134. compile('com.alibaba.android:vlayout:1.2.6.1@aar') {
  135. changing = true
  136. }
  137. compile 'com.alibaba.android:ultraviewpager:1.0.6.5@aar'
  138. compile('me.everything:overscroll-decor-android:1.0.1@aar') {
  139. transitive true
  140. exclude group: 'com.android.support', module: 'recyclerview-v7'
  141. }
  142. compile('com.alibaba.android:virtualview:1.0.2@aar') {
  143. transitive true
  144. exclude group: 'com.android.support', module: 'appcompat-v7'
  145. exclude group: 'com.tmall.android', module: 'tmallandroid_mui'
  146. exclude group: 'com.google.android', module: 'support-v7-recyclerview'
  147. exclude group: 'com.android.support', module: 'support-v4'
  148. exclude group: 'com.android.support', module: 'support-annotations'
  149. }
  150. //compile 'com.alibaba.android:tangram:2.2.1@aar'
  151. /**
  152. * Aop埋点
  153. */
  154. compile "org.aspectj:aspectjrt:$aspectj_version"
  155. /**
  156. * constraint-layout布局依赖
  157. */
  158. compile 'com.android.support.constraint:constraint-layout:1.1.0-beta5'
  159. /**
  160. * 指示器
  161. */
  162. compile 'com.github.hackware1993:magicindicator:1.5.0'
  163. /**
  164. * 汉字辅助
  165. */
  166. compile files('libs/chinese2py.jar')
  167. /**
  168. * 二维码扫描
  169. */
  170. compile 'cn.yipianfengye.android:zxing-library:2.2'
  171. /**
  172. * GLIDE 图片处理器
  173. */
  174. compile ('jp.wasabeef:glide-transformations:2.0.1') {
  175. exclude group: 'com.github.bumptech.glide'
  176. }
  177. /**
  178. * 时间选择器
  179. */
  180. compile 'com.contrarywind:Android-PickerView:4.1.6'
  181. /**
  182. * 图片查看器
  183. */
  184. compile 'com.github.iielse:ImageWatcher:1.1.5'
  185. /**
  186. * 权限控制
  187. */
  188. compile 'pub.devrel:easypermissions:0.2.0'
  189. compile 'com.github.pinguo-zhouwei:MZBannerView:v2.0.2'
  190. /**
  191. * json
  192. */
  193. compile 'com.alibaba:fastjson:1.2.23'
  194. /**
  195. * google
  196. */
  197. compile 'com.google.guava:guava:20.0'
  198. /**
  199. * netty
  200. */
  201. compile 'io.netty:netty-all:4.1.42.Final'
  202. //eventbus
  203. compile 'org.greenrobot:eventbus:3.0.0'
  204. }
  205. //tasks.withType(JavaCompile) {
  206. // compileTask -> compileTask.dependsOn ndkBuild
  207. //}
  208. //
  209. //task ndkBuild(type: Exec) {
  210. // workingDir file('src/main/jni')
  211. // commandLine getNdkBuildCmd()
  212. //}
  213. //
  214. //task cleanNative(type: Exec){
  215. // workingDir file('src/main/jni')
  216. // commandLine getNdkBuildCmd(), 'clean'
  217. //}
  218. //
  219. //clean.dependsOn cleanNative
  220. //
  221. //def getNdkDir() {
  222. // if (System.env.ANDROID_NDK_ROOT != null)
  223. // return System.env.ANDROID_NDK_ROOT
  224. // Properties properties = new Properties()
  225. // properties.load(project.rootProject.file('local.properties').newDataInputStream())
  226. // def ndkdir = properties.getProperty('ndk.dir', null)
  227. // if (ndkdir == null)
  228. // 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.")
  229. // return ndkdir
  230. //}
  231. //
  232. //def getNdkBuildCmd() {
  233. // def ndkbuild = getNdkDir() + "/ndk-build"
  234. // //Window下需要加.cmd后缀,Mac下则不需要
  235. // ndkbuild += ""
  236. // return ndkbuild
  237. //}