build.gradle 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'com.jakewharton.butterknife'
  3. android {
  4. compileSdkVersion androidConfigs.compileSdkVersion
  5. buildToolsVersion androidConfigs.buildToolsVersion
  6. defaultConfig {
  7. applicationId "com.sheep.jiuyan.samllsheep"
  8. minSdkVersion 18
  9. targetSdkVersion 27
  10. versionCode VERSION_CODE as int
  11. versionName VERSION_NAME
  12. multiDexEnabled true
  13. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  14. ndk {
  15. abiFilters "armeabi-v7a", 'x86'//, 'armeabi-v7a', 'x86_64', 'arm64-v8a'
  16. }
  17. // jackOptions {
  18. // enabled true
  19. // }
  20. multiDexEnabled true
  21. }
  22. // compileOptions{
  23. // sourceCompatibility org.gradle.api.JavaVersion.VERSION_1_8
  24. // targetCompatibility org.gradle.api.JavaVersion.VERSION_1_8
  25. // }
  26. signingConfigs {
  27. config {
  28. keyAlias 'sheep'
  29. keyPassword 'zhaoyi2004'
  30. storeFile file('.././sign.jks')
  31. storePassword 'zhaoyi2004'
  32. v1SigningEnabled true
  33. v2SigningEnabled false
  34. }
  35. }
  36. lintOptions {
  37. abortOnError false
  38. disable 'MissingTranslation'
  39. }
  40. dexOptions {
  41. preDexLibraries = false
  42. javaMaxHeapSize "4g"
  43. }
  44. packagingOptions {
  45. exclude 'META-INF/services/com.fasterxml.jackson.core.JsonFactory'
  46. }
  47. buildTypes {
  48. release {
  49. minifyEnabled true
  50. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  51. signingConfig signingConfigs.config
  52. }
  53. debug {
  54. minifyEnabled true
  55. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  56. signingConfig signingConfigs.config
  57. }
  58. }
  59. productFlavors.all { flavor ->
  60. flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: "${flavor.name}",
  61. DUANDUAN_GRAPH : "${flavor.name}",
  62. DUANDUAN_DATASHARE : "${flavor.name}",
  63. ]
  64. }
  65. productFlavors {
  66. sheepzhangwei {
  67. applicationId "com.sheep.jiuyan.samllsheep"
  68. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "sheeptest",
  69. DUANDUAN_GRAPH : "sheeptest",
  70. DUANDUAN_DATASHARE : "sheeptest",
  71. UMENG_APPKEY : "58edcfeb310c93091c000be2"
  72. ]
  73. buildConfigField "String", "DUANDUAN_DATASHARE", '"sheeptest"'
  74. buildConfigField "String", "DUANDUAN_GRAPH", '"sheeptest"'
  75. buildConfigField "boolean", "XXTEA_ENCRYPT", 'true'//false为不用加密
  76. buildConfigField "String", "API_DOMAIN", '"test.bdmapp.kfzs.com"'
  77. buildConfigField "String", "JFSC_DOMAIN", '"http://10.8.210.190:8080/"'//积分商城
  78. buildConfigField "String", "CAPTCHA_DOMAIN", '"captcha.kuaifazs.com"'
  79. buildConfigField "String", "umeng_appkey", '"58dc9509aed17959a3001bff"'
  80. signingConfig signingConfigs.config
  81. }
  82. sheeptest {
  83. applicationId "com.sheep.jiuyan.samllsheep"
  84. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "sheeptest",
  85. DUANDUAN_GRAPH : "sheeptest",
  86. DUANDUAN_DATASHARE : "sheeptest",
  87. UMENG_APPKEY : "58edcfeb310c93091c000be2"
  88. ]
  89. buildConfigField "String", "DUANDUAN_DATASHARE", '"sheeptest"'
  90. buildConfigField "String", "DUANDUAN_GRAPH", '"sheeptest"'
  91. buildConfigField "boolean", "XXTEA_ENCRYPT", 'true'
  92. buildConfigField "String", "API_DOMAIN", '"test.bdmapp.kfzs.com"'
  93. buildConfigField "String", "JFSC_DOMAIN", '"http://10.8.210.190:8080/"'//积分商城
  94. buildConfigField "String", "CAPTCHA_DOMAIN", '"captcha.kuaifazs.com"'
  95. buildConfigField "String", "umeng_appkey", '"58dc9509aed17959a3001bff"'
  96. signingConfig signingConfigs.config
  97. }
  98. sheep {
  99. applicationId "com.sheep.jiuyan.samllsheep"
  100. manifestPlaceholders = [UMENG_CHANNEL_VALUE: "sheep",
  101. DUANDUAN_GRAPH : "sheep",
  102. DUANDUAN_DATASHARE : "sheep",
  103. UMENG_APPKEY : "58edcfeb310c93091c000be2"
  104. ]
  105. buildConfigField "String", "DUANDUAN_DATASHARE", '"sheep"'
  106. buildConfigField "String", "DUANDUAN_GRAPH", '"sheep"'
  107. buildConfigField "boolean", "XXTEA_ENCRYPT", 'true'
  108. buildConfigField "String", "API_DOMAIN", '"app.bandai.yunduanzs.cn"'
  109. buildConfigField "String", "JFSC_DOMAIN", '"http://jf.bandaimi.com/"'//积分商城
  110. buildConfigField "String", "CAPTCHA_DOMAIN", '"captcha.kuaifazs.com"'
  111. buildConfigField "String", "umeng_appkey", '"58dc9509aed17959a3001bff"'
  112. signingConfig signingConfigs.config
  113. }
  114. }
  115. }
  116. repositories {
  117. flatDir {
  118. dirs 'libs'
  119. }
  120. google()
  121. }
  122. dependencies {
  123. compile 'com.android.support:design:27.1.0'
  124. compile 'com.android.support.constraint:constraint-layout:1.0.2'
  125. testCompile 'junit:junit:4.12'
  126. compile 'com.google.code.gson:gson:2.8.2'
  127. compile('com.jcodecraeer:xrecyclerview:1.5.2') {
  128. // compile 'com.shark:screencapture:1.0.0'
  129. exclude group: 'com.android.support', module: 'design'
  130. }
  131. compile 'com.squareup.okhttp3:okhttp:3.10.0'
  132. compile 'org.greenrobot:eventbus:3.1.1'
  133. compile 'com.zhy:base-adapter:3.0.3'
  134. // compile 'com.liulishuo.filedownloader:library:1.6.9'
  135. compile 'com.tencent.bugly:crashreport_upgrade:1.3.4'
  136. //其中latest.release指代最新版本号,也可以指定明确的版本号,例如1.2.0
  137. compile 'com.tencent.bugly:nativecrashreport:3.3.1'
  138. //其中latest.release指代最
  139. // compile 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+'
  140. debugCompile('com.readystatesoftware.chuck:library:1.1.0') {
  141. exclude group: 'com.android.support', module: 'design'
  142. }
  143. // compile 'de.hdodenhof:circleimageview:2.2.0'
  144. releaseCompile('com.readystatesoftware.chuck:library-no-op:1.1.0') {
  145. exclude group: 'com.android.support', module: 'design'
  146. }
  147. compile 'org.xutils:xutils:3.5.0'
  148. compile 'com.mylhyl:acp:1.1.7'
  149. // compile 'cn.yipianfengye.android:zxing-library:2.2'
  150. compile 'com.github.huburt-Hu:NewbieGuide:v1.2.0'
  151. debugCompile 'com.android.support:multidex:1.0.1'
  152. //不要修改这里,相信我
  153. releaseCompile 'com.android.support:multidex:1.0.3'
  154. compile(name: 'com.kfzs.safe', ext: 'aar')
  155. //butterknife
  156. compile 'com.jakewharton:butterknife:8.8.1'
  157. annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
  158. //dagger2
  159. // compile 'com.google.dagger:dagger:+'
  160. // compile 'com.google.dagger:dagger-compiler:+'
  161. provided 'org.glassfish:javax.annotation:10.0-b28'
  162. compile 'com.google.dagger:dagger:2.12'
  163. annotationProcessor 'com.google.dagger:dagger-compiler:2.12'
  164. //retrofit
  165. compile 'com.squareup.retrofit2:retrofit:2.4.0'
  166. compile 'com.squareup.retrofit2:converter-gson:2.4.0'
  167. compile 'com.squareup.okhttp3:logging-interceptor:3.10.0'
  168. // compile 'com.squareup.retrofit2:adapter-rxjava2:+'
  169. compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
  170. //rxjava
  171. compile 'io.reactivex.rxjava2:rxandroid:2.0.2'
  172. compile 'io.reactivex.rxjava2:rxjava:2.1.12'
  173. //获取动态权限三方库
  174. compile 'pub.devrel:easypermissions:1.2.0'
  175. compile 'net.danlew:android.joda:2.9.3'
  176. compile 'com.orhanobut:logger:1.15'
  177. //友盟
  178. compile 'com.umeng.sdk:common:1.4.4'
  179. //compile 'com.umeng.sdk:analytics:latest.integration'
  180. //fast json
  181. compile 'com.alibaba:fastjson:1.2.47'
  182. //添加半袋米相关
  183. compile(name: 'appstoreutils', ext: 'aar')
  184. compile project(':view')
  185. // compile(name: 'view-release', ext: 'aar')
  186. compile 'com.flipboard:bottomsheet-core:1.5.3'
  187. compile 'com.flipboard:bottomsheet-commons:1.5.3'
  188. compile 'com.google.protobuf:protobuf-java:3.2.0'
  189. compile 'com.umeng.analytics:analytics:6.0.9'
  190. // compile(name: 'FileDownloader-1.0.0', ext: 'aar')
  191. // compile files('libs/SocialSDK_QQ_Simplify.jar')
  192. // compile files('libs/SocialSDK_Sina_Simplify.jar')
  193. // compile files('libs/SocialSDK_WeChat_Simplify.jar')
  194. // compile files('libs/umeng_shareboard_widget.jar')
  195. // compile files('libs/umeng_social_api.jar')
  196. // compile files('libs/umeng_social_net.jar')
  197. // compile files('libs/umeng_social_shareboard.jar')
  198. // compile files('libs/umeng_social_shareview.jar')
  199. // compile files('libs/umeng_social_tool.jar')
  200. compile files('libs/open_sdk_r5923_lite.jar')
  201. compile files('libs/wechat-sdk-android-with-mta-1.1.6.jar')
  202. compile files('libs/umeng_social_tool.jar')
  203. compile files('libs/umeng_social_shareboard.jar')
  204. compile files('libs/umeng_social_net.jar')
  205. compile files('libs/umeng_social_api.jar')
  206. compile files('libs/umeng_shareboard_widget.jar')
  207. compile files('libs/SocialSDK_WeiXin_Full.jar')
  208. compile files('libs/SocialSDK_QQ_Full.jar')
  209. compile 'com.zhy:okhttputils:2.6.2'
  210. // compile 'com.kf.framework:kf-utils:latest.integration@aar'
  211. compile 'com.kf.framework:kf-utils:1.4.5@aar'
  212. // compile 'com.kf.framework:volleyplus:latest.integration@aar'
  213. compile 'com.kf.framework:volleyplus:1.4.5@aar'
  214. compile 'com.android.support:support-annotations:27.1.0'
  215. compile 'com.android.support:recyclerview-v7:27.1.0'
  216. compile project(':datashare')
  217. compile files('libs/jackson-core-2.2.1.jar')
  218. compile files('libs/jackson-dataformat-xml-2.1.2.jar')
  219. compile 'io.reactivex:rxandroid:1.2.1'
  220. compile 'com.github.ithedan:TextViewDrawable:v1.0'
  221. compile 'com.github.zhangkexpz:LayoutScroll:v1.0'
  222. compile 'me.iwf.photopicker:PhotoPicker:0.9.12@aar'
  223. compile 'com.github.bumptech.glide:glide:4.1.1'
  224. // compile 'com.github.yalantis:ucrop:2.2.1-native'
  225. // compile 'com.google.zxing:core:3.3.0'
  226. compile project(':ucrop')
  227. compile project(':kfzslibrary')
  228. compile ('com.arialyy.aria:aria-core:3.3.16'){
  229. exclude group: 'com.android.support'
  230. }
  231. annotationProcessor 'com.arialyy.aria:aria-compiler:3.3.16'
  232. compile 'com.sunfusheng:marqueeview:1.3.3'
  233. compile 'com.github.nanchen2251:CompressHelper:1.0.5'
  234. }
  235. def releaseTime() {
  236. return new Date().format("MMddHHmm", TimeZone.getDefault())
  237. }
  238. //在apk文件后边生成版本号信息
  239. android.applicationVariants.all {
  240. variant ->
  241. variant.outputs.each {
  242. output -> buildType.name == "release" ? output.outputFile = new File(output.outputFile.parent, productFlavors[0].name + "_" + buildType.name + "_v" + android.defaultConfig.versionName + "_" + android.defaultConfig.versionCode + "-${releaseTime()}.apk") : null
  243. }
  244. }