基础组件库
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

build.gradle 12 KiB

4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
3 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
4 anos atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. // 添加插件
  2. def localProperties = new Properties()
  3. def localPropertiesFile = rootProject.file('local.properties')
  4. if (localPropertiesFile.exists()) {
  5. localPropertiesFile.withReader('UTF-8') { reader ->
  6. localProperties.load(reader)
  7. }
  8. }
  9. def flutterRoot = localProperties.getProperty('flutter.sdk')
  10. if (flutterRoot == null) {
  11. throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
  12. }
  13. def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
  14. if (flutterVersionCode == null) {
  15. flutterVersionCode = '1'
  16. }
  17. def flutterVersionName = localProperties.getProperty('flutter.versionName')
  18. if (flutterVersionName == null) {
  19. flutterVersionName = '1.6.0'
  20. }
  21. // 获取当前时间(年月日)
  22. def releaseTime() {
  23. return new Date().format("YYYYMMdd", TimeZone.getTimeZone("UTC"))
  24. }
  25. apply plugin: 'com.android.application'
  26. apply plugin: 'com.mob.sdk'
  27. apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
  28. android {
  29. compileSdkVersion 28
  30. lintOptions {
  31. disable 'InvalidPackage'
  32. }
  33. // 默认配置
  34. defaultConfig {
  35. applicationId "cn.zhios.zhiying"
  36. minSdkVersion 21
  37. targetSdkVersion 28
  38. versionCode 1618056480
  39. versionName "10.6.0"
  40. aaptOptions.cruncherEnabled = false
  41. aaptOptions.useNewCruncher = false
  42. multiDexEnabled true
  43. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  44. ndk {
  45. //选择要添加的对应cpu类型的.so库。
  46. //abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a'
  47. // abiFilters 'armeabi-v7a','x86_64'
  48. }
  49. }
  50. // 签名配置
  51. signingConfigs {
  52. // 智夜生活
  53. zhiying {
  54. storeFile file('zhiying.jks')
  55. storePassword 'zhioscom'
  56. keyAlias 'zysh'
  57. keyPassword 'zhioscom'
  58. v1SigningEnabled true
  59. v2SigningEnabled true
  60. }
  61. }
  62. flavorDimensions "app"
  63. buildTypes {
  64. debug {
  65. buildConfigField "boolean", "LOG_DEBUG", "true"
  66. minifyEnabled false
  67. zipAlignEnabled true
  68. shrinkResources false
  69. signingConfig signingConfigs.zhiying
  70. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  71. }
  72. release {
  73. buildConfigField "boolean", "LOG_DEBUG", "false"
  74. minifyEnabled false
  75. shrinkResources false
  76. zipAlignEnabled true
  77. signingConfig signingConfigs.zhiying
  78. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  79. }
  80. }
  81. dexOptions {
  82. //最大堆内存
  83. javaMaxHeapSize "4g"//4g
  84. //使用增量模式构建
  85. incremental true
  86. //是否支持大工程模式
  87. jumboMode = true
  88. //预编译
  89. preDexLibraries = false
  90. //线程数
  91. threadCount = 8
  92. }
  93. // 应用信息配置
  94. // productFlavors {
  95. // // 智夜生活
  96. // zhiying {
  97. // applicationId "cn.zhios.zhiying"
  98. // versionCode 60
  99. // dimension "app"
  100. // versionName '1.3.20'
  101. // // 签名信息
  102. // signingConfig signingConfigs.zhiying
  103. // }
  104. // }
  105. //
  106. // // 打包脚本
  107. // android.applicationVariants.all { variant ->
  108. // if (variant.buildType.name != "debug") {
  109. // variant.getPackageApplicationProvider().get().outputDirectory = new File(project.rootDir.absolutePath + "/app/build/outputs/apk")
  110. // }
  111. //
  112. // variant.outputs.all { output ->
  113. // def outputFile = output.outputFile
  114. // if (outputFile != null && outputFile.name.endsWith('.apk')) {
  115. // //这里修改apk文件名
  116. // def fileName = "${variant.productFlavors[0].name}_${releaseTime()}01_&V${variant.productFlavors[0].versionCode}.apk"
  117. // outputFileName = fileName
  118. // }
  119. // }
  120. // }
  121. configurations.all {
  122. resolutionStrategy.eachDependency { DependencyResolveDetails details ->
  123. def requested = details.requested
  124. if (requested.group == 'com.android.support') {
  125. if (!requested.name.startsWith("multidex")) {
  126. details.useVersion '28.0.3'
  127. }
  128. }
  129. resolutionStrategy.force 'com.android.support:support-v4:28.0.0'
  130. }
  131. }
  132. }
  133. flutter {
  134. source '../..'
  135. }
  136. dependencies {
  137. implementation 'androidx.appcompat:appcompat:1.2.0'
  138. implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
  139. testImplementation 'junit:junit:4.12'
  140. androidTestImplementation 'androidx.test:runner:1.1.1'
  141. androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
  142. // //登陆
  143. // implementation 'com.ali.auth.sdk:alibabauth_core:2.0.0.11@aar'
  144. // implementation 'com.ali.auth.sdk:alibabauth_ui:2.0.0.11@aar'
  145. // implementation 'com.ali.auth.sdk:alibabauth_ext:2.0.0.11@aar'
  146. // //安全组件
  147. // implementation 'com.taobao.android:securityguardaar3:5.4.171@aar'
  148. // implementation 'com.taobao.android:securitybodyaar3:5.4.99@aar'
  149. // implementation 'com.taobao.android:avmpaar3:5.4.36@aar'
  150. // implementation 'com.taobao.android:sgmiddletieraar3:5.4.9@aar'
  151. // //Mtop
  152. // implementation 'com.taobao.android:mtopsdk_allinone_open:3.1.2.5@jar'
  153. // //applink
  154. // implementation 'com.alibaba.sdk.android:alibc_link_partner:4.1.15@aar'
  155. // //ut
  156. // implementation 'com.taobao.android:utdid4all:1.5.2'
  157. // implementation 'com.alibaba.mtl:app-monitor-sdk:2.6.4.5_for_bc'
  158. // // 电商基础组件
  159. // implementation 'com.alibaba.sdk.android:AlibcTradeCommon:4.0.0.16@aar'
  160. // implementation 'com.alibaba.sdk.android:AlibcTradeBiz:4.0.0.16@aar'
  161. // implementation 'com.alibaba.sdk.android:nb_trade:4.0.0.16@aar'
  162. implementation 'com.alibaba.baichuan.sdk:alibclogin:5.0.0.13'
  163. // applink
  164. implementation 'com.alibaba.baichuan.sdk:alibcapplink:5.0.0.13'
  165. // 广告SDK
  166. implementation 'com.alibaba.baichuan.sdk:alibcad:5.0.0.13'
  167. // 小程序
  168. implementation 'com.alibaba.baichuan.sdk:alibctriver:5.0.0.13'
  169. // c++基础库(如果工程中没有接入该so包:libc++_shared.so,需要接入该sdk)
  170. implementation "llvm.stl:cpp_shared:0.0.3@aar"
  171. // 直播
  172. implementation 'com.alibaba.baichuan.sdk:alibctriver_live:5.0.0.13'
  173. // webview容器
  174. implementation 'com.alibaba.baichuan.sdk:alibcwebview:5.0.0.13'
  175. // 电商基础组件
  176. implementation 'com.alibaba.baichuan.sdk:alibctradecommon:5.0.0.13'
  177. implementation 'com.alibaba.baichuan.sdk:alibcnbtrade:5.0.0.13'
  178. implementation 'com.alibaba.baichuan.sdk:alibcprotocol:5.0.0.13'
  179. // 辅助排查工具(可选)
  180. implementation "com.alibaba.baichuan.sdk:alibctools:5.0.0.13"
  181. // 安全保镖v5版本(根据实际情况,v5和v6版本选择其一)
  182. implementation 'com.taobao.android:securityguardaar3:5.0.0.9-v5@aar'
  183. implementation 'com.taobao.android:securitybodyaar3:5.0.0.9-v5@aar'
  184. implementation 'com.taobao.android:avmpaar3:5.0.0.9-v5@aar'
  185. implementation 'com.taobao.android:sgmiddletieraar3:5.0.0.9-v5@aar'
  186. implementation 'com.alibaba:fastjson:1.2.41@jar'
  187. implementation 'com.amap.api:location:5.2.0'
  188. implementation (name: 'kaduofensdk', ext: 'aar')
  189. }
  190. MobSDK {
  191. appKey "30dc33054b635"
  192. appSecret "396e98c293130c9976fb7428b6b434d6"
  193. MobLink {
  194. uriScheme "fnoos://cn.zhios.zhiying"
  195. appLinkHost "bied.t4m.cn"
  196. }
  197. //手机验证登录
  198. SecVerify {}
  199. //短信
  200. SMSSDK {}
  201. ShareSDK {
  202. // platform configuration information
  203. devInfo {
  204. QQ {
  205. appId "1111030588"
  206. appKey "XoHKlrBybXy7ORBt"
  207. shareByAppClient true
  208. bypassApproval false
  209. enable true
  210. }
  211. Wechat {
  212. appId "wx598aaef252cd78e4"
  213. appSecret "e3e41385b2832d53745805181cb0daa6"
  214. shareByAppClient true
  215. withShareTicket true
  216. bypassApproval false
  217. enable true
  218. }
  219. WechatMoments {
  220. enable true
  221. }
  222. WechatFavorite {
  223. enable true
  224. }
  225. QZone {
  226. appId "1111030588"
  227. appKey "XoHKlrBybXy7ORBt"
  228. enable true
  229. }
  230. SinaWeibo {
  231. enable true
  232. }
  233. }
  234. }
  235. //配置MobPush
  236. MobPush {
  237. //配置厂商推送(可选配置,不需要厂商推送可不配置,需要哪些厂商推送只需配置哪些厂商配置即可)
  238. devInfo {
  239. //配置小米厂商推送
  240. XIAOMI {
  241. appId "您的小米平台appId"
  242. appKey "您的小米平台appKey"
  243. }
  244. //配置华为厂商推送
  245. HUAWEI {
  246. appId "您的华为平台appId"
  247. }
  248. //配置魅族厂商推送
  249. MEIZU {
  250. appId "您的魅族平台appId"
  251. appKey "您的魅族平台appKey"
  252. }
  253. // //配置FCM厂商推送
  254. // FCM {
  255. // //设置默认推送通知显示图标
  256. // iconRes "@mipmap/default_ic_launcher"
  257. // }
  258. //配置OPPO厂商推送
  259. OPPO {
  260. appKey "您的OPPO平台appKey"
  261. appSecret "您的OPPO平台appSecret"
  262. }
  263. //配置VIVO厂商推送
  264. VIVO {
  265. appId "您的VIVO平台appId"
  266. appKey "您的VIVO平台appKey"
  267. }
  268. }
  269. }
  270. }
  271. // 注册SecVerify的相关信息
  272. //MobSDK {
  273. //// appKey "2ed488d929488"
  274. //// appSecret "53d4a16298d283828f2444cdd6d6548a"
  275. // //手机验证登录
  276. // SecVerify {}
  277. //
  278. // //短信
  279. // SMSSDK {}
  280. //
  281. // //调用MobPush,推送
  282. //// MobPush {
  283. //// //设置角标开关(不需要可不设置)
  284. ////// badge true
  285. //// //集成其他推送通道(可选)
  286. //// devInfo {
  287. //// //华为推送配置信息
  288. //// HUAWEI {
  289. //// appId "${HUAWEI_PUSH_ID}"
  290. //// }
  291. //// //魅族推送配置信息
  292. //// MEIZU {
  293. //// appId "${MEIZHU_PUSH_APPID}"
  294. //// appKey "${MEIZHU_PUSH_APPKEY}"
  295. //// }
  296. //// //小米推送配置信息
  297. //// XIAOMI {
  298. //// appId "${XIAOMI_PUSH_APPID}"
  299. //// appKey "${XIAOMI_PUSH_APPKEY}"
  300. //// }
  301. //// //FCM推送通道配置
  302. ////// FCM {
  303. //// //设置默认推送通知显示图标
  304. ////// iconRes "@mipmap/ic_launcher"
  305. ////// }
  306. //// //OPPO推送配置信息
  307. //// OPPO {
  308. //// appKey "${OPPO_PUSH_APPKEY}"
  309. //// appSecret "${OPPO_PUSH_APPSECRET}"
  310. //// }
  311. //// //VIVO推送配置信息
  312. //// VIVO {
  313. //// appId "${VIVO_PUSH_APPID}"
  314. //// appKey "${VIVO_PUSH_APPKEY}"
  315. //// }
  316. //// }
  317. //// }
  318. //
  319. // //分享
  320. // ShareSDK {
  321. // loopShare true
  322. // devInfo {
  323. // SinaWeibo {
  324. // enable true
  325. // }
  326. // Wechat {
  327. //// appId "${Wechat_appid}"
  328. //// appSecret "${Wechat_appSecret}"
  329. // enable true
  330. // withShareTicket true
  331. // bypassApproval false
  332. // }
  333. // QQ {
  334. // enable true
  335. // }
  336. // WechatMoments {
  337. // enable true
  338. // }
  339. // WechatFavorite {
  340. // enable true
  341. // }
  342. // QZone {
  343. // enable true
  344. // }
  345. // }
  346. // }
  347. //
  348. // //网页打开app,接受邀请码
  349. // MobLink {
  350. //// uriScheme "${uri_Scheme}"
  351. //// appLinkHost "${app_LinkHost}"
  352. // }
  353. //}