build.gradle 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'com.jakewharton.butterknife'
  3. apply plugin: 'org.greenrobot.greendao'
  4. //apply plugin: 'com.didi.virtualapk.host'
  5. android {
  6. compileSdkVersion ANDROID_COMPILE_SDK_VERSION as int
  7. defaultConfig {
  8. applicationId "com.sheep.jiuyan.samllsheep"
  9. minSdkVersion ANDROID_MIN_SDK_VERSION as int
  10. targetSdkVersion ANDORID_TARGET_SDK_VERSION as int
  11. versionCode VERSION_CODE as int
  12. versionName VERSION_NAME
  13. multiDexEnabled true
  14. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  15. ndk {
  16. abiFilters "armeabi-v7a"//, 'x86'//, 'armeabi-v7a', 'x86_64', 'arm64-v8a'
  17. }
  18. // jackOptions {
  19. // enabled true
  20. // }
  21. flavorDimensions "versionCode"
  22. packagingOptions {
  23. exclude 'META-INF/proguard/androidx-annotations.pro'
  24. }
  25. }
  26. greendao {
  27. schemaVersion 20
  28. targetGenDir 'src/main/java'
  29. }
  30. signingConfigs {
  31. config {
  32. keyAlias 'sheep'
  33. keyPassword 'zhaoyi2004'
  34. storeFile file('.././sign.jks')
  35. storePassword 'zhaoyi2004'
  36. v1SigningEnabled true
  37. v2SigningEnabled false
  38. }
  39. }
  40. lintOptions {
  41. abortOnError false
  42. disable 'MissingTranslation'
  43. }
  44. dexOptions {
  45. preDexLibraries = false
  46. javaMaxHeapSize "4g"
  47. }
  48. packagingOptions {
  49. exclude 'META-INF/services/com.fasterxml.jackson.core.JsonFactory'
  50. exclude "**/module-info.class"
  51. }
  52. buildTypes {
  53. release {
  54. minifyEnabled true
  55. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  56. signingConfig signingConfigs.config
  57. }
  58. debug {
  59. signingConfig signingConfigs.config
  60. }
  61. }
  62. productFlavors.all { flavor ->
  63. flavor.manifestPlaceholders = [DUANDUAN_GRAPH : "${flavor.name}",
  64. DUANDUAN_DATASHARE: "${flavor.name}",
  65. ]
  66. }
  67. productFlavors {
  68. developSheeptest {
  69. applicationId "com.sheep.jiuyan.samllsheep"
  70. manifestPlaceholders = [DUANDUAN_GRAPH : "sheeptest",
  71. DUANDUAN_DATASHARE: "sheeptest",
  72. jpush_appkey : "627ffad0b1cdf701d15e027a",
  73. umeng_app_key : "5ab0a1da8f4a9d742900035f"
  74. ]
  75. buildConfigField "String", "DUANDUAN_DATASHARE", '"sheeptest"'
  76. buildConfigField "String", "DUANDUAN_GRAPH", '"sheeptest"'
  77. resValue "string", "app_name", "小绵羊测试"
  78. buildConfigField "boolean", "XXTEA_ENCRYPT", 'true'
  79. signingConfig signingConfigs.config
  80. }
  81. sheeptestjiguang {
  82. applicationId "com.sheep.jiuyan.samllsheep.test"
  83. manifestPlaceholders = [DUANDUAN_GRAPH : "sheeptestjiguang",
  84. DUANDUAN_DATASHARE: "sheeptestjiguang",
  85. jpush_appkey : "627ffad0b1cdf701d15e027a",
  86. umeng_app_key : "5ab0a1da8f4a9d742900035f"
  87. ]
  88. buildConfigField "String", "DUANDUAN_DATASHARE", '"sheeptestjiguang"'
  89. buildConfigField "String", "DUANDUAN_GRAPH", '"sheeptestjiguang"'
  90. resValue "string", "app_name", "小绵羊极光测试"
  91. buildConfigField "boolean", "XXTEA_ENCRYPT", 'true'
  92. signingConfig signingConfigs.config
  93. }
  94. sheep {
  95. applicationId "com.sheep.jiuyan.samllsheep"
  96. manifestPlaceholders = [DUANDUAN_GRAPH : "sheep",
  97. DUANDUAN_DATASHARE: "sheep",
  98. jpush_appkey : "28b74d520261c6f78e3e0921",
  99. umeng_app_key : "5ab0a1da8f4a9d742900035f"
  100. ]
  101. buildConfigField "String", "DUANDUAN_DATASHARE", '"sheep"'
  102. buildConfigField "String", "DUANDUAN_GRAPH", '"sheep"'
  103. resValue "string", "app_name", "小绵羊"
  104. buildConfigField "boolean", "XXTEA_ENCRYPT", 'true'
  105. signingConfig signingConfigs.config
  106. }
  107. }
  108. sourceSets {
  109. main() {
  110. jniLibs.srcDirs = ['src/main/libs']
  111. jni.srcDirs = [] //屏蔽掉默认的jni编译生成过程
  112. }
  113. }
  114. compileOptions {
  115. sourceCompatibility JavaVersion.VERSION_1_8
  116. targetCompatibility JavaVersion.VERSION_1_8
  117. }
  118. }
  119. repositories {
  120. flatDir {
  121. dirs 'libs'
  122. }
  123. google()
  124. }
  125. configurations.all {
  126. resolutionStrategy.eachDependency { DependencyResolveDetails details ->
  127. def requested = details.requested
  128. if (requested.group == 'com.android.support') {
  129. if (!requested.name.startsWith("multidex")) {
  130. details.useVersion "$supportLibVersion"
  131. }
  132. }
  133. }
  134. }
  135. dependencies {
  136. implementation "com.android.support:support-v4:$supportLibVersion"
  137. //noinspection GradleCompatible
  138. implementation "com.android.support:cardview-v7:$supportLibVersion"
  139. implementation("com.android.support:design:$supportLibVersion") {
  140. exclude group: 'com.android.support', module: 'support-annotations'
  141. exclude group: 'com.android.support', module: 'support-compat'
  142. exclude group: 'com.android.support', module: 'support-core-ui'
  143. exclude group: 'com.android.support', module: 'support-core-utils'
  144. exclude group: 'com.android.support', module: 'support-fragment'
  145. exclude group: 'com.android.support', module: 'transition'
  146. exclude group: 'com.android.support', module: 'appcompat-v7'
  147. exclude group: 'com.android.support', module: 'cardview-v7'
  148. exclude group: 'com.android.support', module: 'recyclerview-v7'
  149. }
  150. implementation 'com.android.support.constraint:constraint-layout:1.1.3'
  151. testImplementation 'junit:junit:4.12'
  152. implementation 'com.google.code.gson:gson:2.8.2'
  153. // implementation 'com.shark:screencapture:1.0.0'
  154. implementation('com.jcodecraeer:xrecyclerview:1.5.9') {
  155. exclude group: 'com.android.support', module: 'design'
  156. exclude group: 'com.android.support', module: 'recyclerview'
  157. exclude group: 'com.android.support', module: 'appcompat'
  158. }
  159. implementation 'com.squareup.wire:wire-runtime:3.6.0'
  160. implementation 'com.squareup.okhttp3:okhttp:3.11.0'
  161. implementation 'org.greenrobot:eventbus:3.1.1'
  162. // implementation 'com.zhy:base-adapter:3.0.3'
  163. // implementation 'com.liulishuo.filedownloader:library:1.6.9'
  164. implementation 'com.tencent.bugly:crashreport_upgrade:1.3.5'
  165. implementation(name: 'alipaySdk-15.5.9', ext: 'aar')
  166. implementation(name: 'ad_dk_sdk', ext: 'aar')
  167. implementation(name: 'klevinSDK', ext: 'aar')
  168. //其中latest.release指代最新版本号,也可以指定明确的版本号,例如1.2.0
  169. implementation 'com.tencent.bugly:nativecrashreport:3.3.1'
  170. //其中latest.release指代最
  171. implementation "com.tencent.mm.opensdk:wechat-sdk-android-with-mta:5.1.6"
  172. // implementation 'de.hdodenhof:circleimageview:2.2.0'
  173. implementation 'org.xutils:xutils:3.5.0'
  174. // implementation 'com.mylhyl:acp:1.1.7'
  175. implementation('cn.yipianfengye.android:zxing-library:2.2') {
  176. exclude group: 'com.android.support', module: 'appcompat-v7'
  177. exclude group: 'com.android.support', module: 'support-v4'
  178. }
  179. implementation(name: 'newbie-guide-2.4.0.1', ext: 'aar')
  180. debugImplementation 'com.android.support:multidex:1.0.1'
  181. //不要修改这里,相信我
  182. releaseImplementation 'com.android.support:multidex:1.0.3'
  183. implementation(name: 'com.kfzs.safe-201809211354', ext: 'aar')
  184. //butterknife
  185. implementation('com.jakewharton:butterknife:8.8.1') {
  186. exclude group: 'com.android.support', module: 'support-annotations'
  187. exclude group: 'com.android.support', module: 'support-compat'
  188. // exclude group: 'com.jakewharton', module: 'butterknife-annotations'
  189. }
  190. annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
  191. //dagger2
  192. // implementation 'com.google.dagger:dagger:+'
  193. // implementation 'com.google.dagger:dagger-compiler:+'
  194. compileOnly 'org.glassfish:javax.annotation:10.0-b28'
  195. //javax.annotation', module: 'jsr250-api
  196. implementation 'com.google.dagger:dagger:2.12'
  197. //javax.inject', module: 'javax.inject
  198. annotationProcessor 'com.google.dagger:dagger-compiler:2.12'
  199. //retrofit
  200. implementation('com.squareup.retrofit2:retrofit:2.4.0') {
  201. exclude group: 'com.google.android', module: 'android'
  202. exclude group: 'com.squareup.okhttp3', module: 'okhttp'
  203. exclude group: 'org.codehaus.mojo', module: 'animal-sniffer-annotations'
  204. }
  205. //不知道接进来干嘛的,与当前的oaid冲突
  206. //implementation(name: 'msa_mdid_1.0.13', ext: 'aar')
  207. implementation(name: 'oaid_sdk_1.0.25', ext: 'aar')
  208. implementation(name: 'JasmineSDK_v1.2.5', ext: 'aar')
  209. // implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
  210. implementation('org.ligboy.retrofit2:converter-fastjson-android:2.1.0') {
  211. exclude group: 'com.alibaba', module: 'fastjson'
  212. exclude group: 'com.squareup.retrofit2', module: 'retrofit'
  213. }
  214. // implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
  215. // implementation 'com.squareup.retrofit2:adapter-rxjava2:+'
  216. // implementation ('com.squareup.retrofit2:adapter-rxjava:2.1.0') {
  217. // exclude group: 'com.squareup.retrofit2', module: 'retrofit'
  218. // }
  219. implementation('com.squareup.retrofit2:adapter-rxjava2:2.5.0') {
  220. exclude group: 'com.squareup.retrofit2', module: 'retrofit'
  221. exclude group: 'io.reactivex.rxjava2', module: 'rxjava'
  222. }
  223. //rxjava
  224. implementation('io.reactivex.rxjava2:rxandroid:2.1.0') {
  225. exclude group: 'io.reactivex.rxjava2', module: 'rxjava'
  226. }
  227. implementation 'io.reactivex.rxjava2:rxjava:2.2.3'
  228. //获取动态权限三方库
  229. implementation('pub.devrel:easypermissions:1.2.0') {
  230. exclude group: 'com.android.support', module: 'appcompat-v7'
  231. exclude group: 'com.android.support', module: 'support-compat'
  232. exclude group: 'com.android.support', module: 'support-fragment'
  233. }
  234. // implementation 'net.danlew:android.joda:2.9.3'
  235. // implementation 'com.orhanobut:logger:1.15'
  236. //友盟
  237. implementation 'com.umeng.sdk:common:1.5.3'
  238. //implementation 'com.umeng.sdk:analytics:latest.integration'
  239. //添加半袋米相关
  240. implementation(name: 'appstoreutils-201810101432', ext: 'aar')
  241. implementation project(':view')
  242. // implementation(name: 'view-release', ext: 'aar')
  243. // implementation 'com.flipboard:bottomsheet-core:1.5.3'
  244. // implementation 'com.flipboard:bottomsheet-commons:1.5.3'
  245. implementation files('libs/open_sdk_r5923_lite.jar')
  246. // implementation files('libs/wechat-sdk-android-with-mta-1.1.6.jar')
  247. implementation files('libs/umeng_social_tool.jar')
  248. implementation files('libs/umeng_social_shareboard.jar')
  249. implementation files('libs/umeng_social_net.jar')
  250. implementation files('libs/umeng_social_api.jar')
  251. implementation files('libs/umeng_shareboard_widget.jar')
  252. implementation files('libs/SocialSDK_WeiXin_Full.jar')
  253. implementation files('libs/SocialSDK_QQ_Full.jar')
  254. implementation('com.zhy:okhttputils:2.6.2') {
  255. exclude group: 'com.squareup.okhttp3', module: 'okhttp'
  256. }
  257. implementation "com.android.support:support-annotations:$supportLibVersion"
  258. implementation("com.android.support:recyclerview-v7:$supportLibVersion") {
  259. exclude group: 'com.android.support', module: 'support-annotations'
  260. exclude group: 'com.android.support', module: 'support-compat'
  261. exclude group: 'com.android.support', module: 'support-core-ui'
  262. }
  263. implementation('com.github.ithedan:TextViewDrawable:v1.0') {
  264. exclude group: 'com.android.support', module: 'appcompat-v7'
  265. }
  266. // implementation 'com.github.zhangkexpz:LayoutScroll:v1.0'
  267. // implementation 'me.iwf.photopicker:PhotoPicker:0.9.12@aar'
  268. implementation(name: 'PhotoPicker-release-20200506', ext: 'aar')
  269. implementation('com.github.bumptech.glide:glide:4.9.0') {
  270. exclude group: 'com.android.support', module: 'support-fragment'
  271. // exclude group: 'com.github.bumptech.glide', module: 'gifdecoder'
  272. // exclude group: 'com.github.bumptech.glide', module: 'disklrucache'
  273. // exclude group: 'com.github.bumptech.glide', module: 'annotations'
  274. }
  275. annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
  276. // implementation 'com.github.yalantis:ucrop:2.2.1-native'
  277. // implementation 'com.google.zxing:core:3.3.0'
  278. implementation project(':ucrop')
  279. implementation('com.sunfusheng:marqueeview:1.3.3') {
  280. exclude group: 'com.android.support', module: 'appcompat-v7'
  281. }
  282. //极光
  283. implementation files('libs/jcore-android-1.2.0.jar')
  284. implementation files('libs/jpush-android-3.1.2.jar')
  285. //定位
  286. implementation files('libs/BaiduLBS_Android.jar')
  287. //幂动科技
  288. implementation(name: 'mdsdk_1031_1_3_7_4', ext: 'aar')
  289. //轮播图
  290. implementation 'com.youth.banner:banner:1.4.10'
  291. //最新版本
  292. //loading
  293. implementation 'com.github.ybq:Android-SpinKit:1.2.0'
  294. // implementation 'com.github.nanchen2251:CompressHelper:1.0.5'
  295. // implementation(name: 'compresshelper-release', ext: 'aar')
  296. implementation files('libs/compresshelper-release.jar')
  297. implementation('com.haibin:calendarview:3.4.8') {
  298. exclude group: 'com.android.support', module: 'appcompat-v7'
  299. exclude group: 'com.android.support', module: 'recyclerview-v7'
  300. }
  301. implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-alpha-14'
  302. implementation 'org.greenrobot:greendao:3.2.2'
  303. //org.greenrobot', module: 'greendao-api
  304. //okDownload
  305. // core
  306. implementation 'com.liulishuo.okdownload:okdownload:1.0.5'
  307. // provide sqlite to store breakpoints
  308. implementation 'com.liulishuo.okdownload:sqlite:1.0.5'
  309. // provide okhttp to connect to backend
  310. implementation 'com.liulishuo.okdownload:okhttp:1.0.5'
  311. implementation('com.trello.rxlifecycle2:rxlifecycle-components:2.2.2') {
  312. exclude group: 'com.android.support', module: 'appcompat-v7'
  313. // com.trello.rxlifecycle2', module: 'rxlifecycle-android
  314. exclude group: 'io.reactivex.rxjava2', module: 'rxjava'
  315. }
  316. //
  317. // implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
  318. //有米科技
  319. implementation(name: 'YoumiSdk_v8.3.0_2018-09-20', ext: 'aar')
  320. implementation project(':WaterWaveProgress')
  321. implementation "com.android.support:exifinterface:$supportLibVersion"
  322. implementation('com.qiniu:qiniu-android-sdk:7.3.13') {
  323. exclude group: 'com.squareup.okhttp3', module: 'okhttp'
  324. }
  325. api project(':media')
  326. //https://github.com/didi/VirtualAPK
  327. // implementation 'com.didi.virtualapk:core:0.9.8'
  328. //fast json
  329. implementation 'com.alibaba:fastjson:1.2.52'
  330. implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.34'
  331. // implementation 'com.github.yangjie10930:EpMedia:v0.9.5'
  332. //webView 缓存优化初始化 https://github.com/yale8848/CacheWebView
  333. // implementation 'ren.yale.android:cachewebviewlib:2.1.4'
  334. implementation(name: 'cachewebviewlib-2.1.8', ext: 'aar')
  335. //GSYVideoPlayer https://github.com/CarGuo/GSYVideoPlayer
  336. implementation 'com.shuyu:gsyVideoPlayer-java:6.0.3'
  337. //是否需要ExoPlayer模式
  338. implementation 'com.shuyu:GSYVideoPlayer-exo2:6.0.2'
  339. implementation 'com.makeramen:roundedimageview:2.3.0'
  340. //https://github.com/koral--/android-gif-drawable
  341. implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.16'
  342. implementation 'androidx.annotation:annotation:1.0.1'
  343. //鸿途信达 广告sdk
  344. // implementation(name: 'ad-htxd-201901071720', ext: 'aar')
  345. //切换皮肤框架 https://github.com/ximsfei/Android-skin-support
  346. // implementation 'skin.support:skin-support:4.0.1' // skin-support
  347. // implementation 'skin.support:skin-support-appcompat:4.0.1' // skin-support 基础控件支持
  348. // implementation 'skin.support:skin-support-design:4.0.1' // skin-support-design material design 控件支持[可选]
  349. // implementation 'skin.support:skin-support-cardview:4.0.1' // skin-support-cardview CardView 控件支持[可选]
  350. // implementation 'skin.support:skin-support-constraint-layout:4.0.1' // skin-support-constraint-layout ConstraintLayout 控件支持[可选]
  351. implementation project(':skin-support')
  352. // implementation 'skin.support:skin-support:3.1.1' // skin-support 基础控件支持
  353. implementation 'skin.support:skin-support-design:3.1.1'
  354. // skin-support-design material design 控件支持[可选]
  355. implementation 'skin.support:skin-support-cardview:3.1.1'
  356. // skin-support-cardview CardView 控件支持[可选]
  357. implementation 'skin.support:skin-support-constraint-layout:3.1.1'
  358. // skin-support-constraint-layout ConstraintLayout 控件支持[可选]
  359. implementation 'com.r0adkll:slidableactivity:2.0.6'
  360. implementation project(':shortcut_lib')
  361. implementation 'com.github.ly-android:PermissionUtils:1.0.3'
  362. implementation files('libs/ipaynow_base_2.1.9_api1.0.0.jar')
  363. implementation files('libs/ipaynow_wechatpay_v2.0.5.jar')
  364. implementation(name: 'face-sdk-release', ext: 'aar')
  365. implementation 'com.airbnb.android:lottie:2.7.0'
  366. }
  367. static def releaseTime() {
  368. return new Date().format("MMddHHmm", TimeZone.getDefault())
  369. }
  370. //在apk文件后边生成版本号信息
  371. android.applicationVariants.all {
  372. variant ->
  373. variant.outputs.all {
  374. output ->
  375. // if (buildType.name == "release") {
  376. outputFileName = "${productFlavors[0].name}_${buildType.name}_v${versionName}_${versionCode}-${releaseTime()}.apk"
  377. // }
  378. }
  379. }