build.gradle 7.2 KB

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