基础库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

141 rivejä
3.5 KiB

  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. WechatMoments {
  46. enable true
  47. }
  48. WechatFavorite {
  49. enable true
  50. }
  51. QZone {
  52. enable true
  53. }
  54. SinaWeibo {
  55. enable true
  56. }
  57. }
  58. }
  59. }
  60. android {
  61. compileSdkVersion 28
  62. lintOptions {
  63. disable 'InvalidPackage'
  64. }
  65. defaultConfig {
  66. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  67. applicationId "cn.zhios.zhiying"
  68. minSdkVersion 19
  69. targetSdkVersion 28
  70. aaptOptions.cruncherEnabled = false
  71. aaptOptions.useNewCruncher = false
  72. multiDexEnabled true
  73. versionCode flutterVersionCode.toInteger()
  74. versionName flutterVersionName
  75. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  76. }
  77. signingConfigs{
  78. release {
  79. storeFile file("zhiying.jks")
  80. storePassword "zhioscom"
  81. keyAlias "zysh"
  82. keyPassword "zhioscom"
  83. v1SigningEnabled true
  84. v2SigningEnabled true
  85. }
  86. }
  87. flavorDimensions "app"
  88. buildTypes {
  89. release {
  90. minifyEnabled true
  91. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
  92. signingConfig signingConfigs.release
  93. }
  94. debug {
  95. minifyEnabled false
  96. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
  97. signingConfig signingConfigs.release
  98. }
  99. }
  100. dexOptions {
  101. //最大堆内存
  102. javaMaxHeapSize "4g"//4g
  103. //使用增量模式构建
  104. incremental true
  105. //是否支持大工程模式
  106. jumboMode = true
  107. //预编译
  108. preDexLibraries = false
  109. //线程数
  110. threadCount = 8
  111. }
  112. }
  113. flutter {
  114. source '../..'
  115. }
  116. dependencies {
  117. testImplementation 'junit:junit:4.12'
  118. androidTestImplementation 'androidx.test:runner:1.1.1'
  119. androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
  120. }