基础库
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

build.gradle 4.0 KiB

4 anni fa
4 anni fa
4 anni fa
4 anni fa
4 anni fa
4 anni fa
4 anni fa
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. def localProperties = new Properties()
  2. def localPropertiesFile = rootProject.file('local.properties')
  3. if (localPropertiesFile.exists()) {
  4. localPropertiesFile.withReader('UTF-8') { reader ->
  5. localProperties.load(reader)
  6. }
  7. }
  8. def flutterRoot = localProperties.getProperty('flutter.sdk')
  9. if (flutterRoot == null) {
  10. throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
  11. }
  12. def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
  13. if (flutterVersionCode == null) {
  14. flutterVersionCode = '1'
  15. }
  16. def flutterVersionName = localProperties.getProperty('flutter.versionName')
  17. if (flutterVersionName == null) {
  18. flutterVersionName = '1.0'
  19. }
  20. apply plugin: 'com.android.application'
  21. apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
  22. // 导入MobSDK
  23. apply plugin: 'com.mob.sdk'
  24. MobSDK {
  25. appKey "30dc33054b635"
  26. appSecret "396e98c293130c9976fb7428b6b434d6"
  27. MobLink {
  28. uriScheme "fnoos://cn.zhios.zhiying"
  29. appLinkHost "bied.t4m.cn"
  30. }
  31. //手机验证登录
  32. SecVerify {}
  33. //短信
  34. SMSSDK {}
  35. ShareSDK {
  36. // platform configuration information
  37. devInfo {
  38. QQ {
  39. appId "1111030588"
  40. appKey "XoHKlrBybXy7ORBt"
  41. shareByAppClient true
  42. bypassApproval false
  43. enable true
  44. }
  45. Wechat {
  46. appId "wx598aaef252cd78e4"
  47. appSecret "d2fc2edf9ece746765b3bfc0bf1b230e"
  48. withShareTicket true
  49. bypassApproval false
  50. enable true
  51. }
  52. WechatMoments {
  53. bypassApproval false
  54. enable true
  55. }
  56. WechatFavorite {
  57. bypassApproval false
  58. enable true
  59. }
  60. QZone {
  61. enable true
  62. }
  63. SinaWeibo {
  64. enable true
  65. }
  66. }
  67. }
  68. }
  69. android {
  70. compileSdkVersion 28
  71. lintOptions {
  72. disable 'InvalidPackage'
  73. }
  74. defaultConfig {
  75. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  76. applicationId "cn.zhios.zhiying"
  77. // applicationId "cn.sharesdk.demo"
  78. minSdkVersion 19
  79. targetSdkVersion 28
  80. aaptOptions.cruncherEnabled = false
  81. aaptOptions.useNewCruncher = false
  82. multiDexEnabled true
  83. versionCode flutterVersionCode.toInteger()
  84. versionName flutterVersionName
  85. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  86. }
  87. signingConfigs{
  88. config {
  89. keyAlias 'demokey.keystore'
  90. keyPassword '123456'
  91. storeFile file('demokey.keystore')
  92. storePassword '123456'
  93. }
  94. release {
  95. storeFile file("zhiying.jks")
  96. storePassword "zhioscom"
  97. keyAlias "zysh"
  98. keyPassword "zhioscom"
  99. v1SigningEnabled true
  100. v2SigningEnabled true
  101. }
  102. }
  103. flavorDimensions "app"
  104. buildTypes {
  105. release {
  106. minifyEnabled true
  107. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
  108. signingConfig signingConfigs.release
  109. }
  110. debug {
  111. minifyEnabled false
  112. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
  113. signingConfig signingConfigs.release
  114. }
  115. }
  116. dexOptions {
  117. //最大堆内存
  118. javaMaxHeapSize "4g"//4g
  119. //使用增量模式构建
  120. incremental true
  121. //是否支持大工程模式
  122. jumboMode = true
  123. //预编译
  124. preDexLibraries = false
  125. //线程数
  126. threadCount = 8
  127. }
  128. }
  129. flutter {
  130. source '../..'
  131. }
  132. dependencies {
  133. testImplementation 'junit:junit:4.12'
  134. androidTestImplementation 'androidx.test:runner:1.1.1'
  135. androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
  136. }