Hibok
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.
 
 
 
 
 
 

161 line
5.3 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 plugin: 'kotlin-android-extensions'
  22. apply plugin: 'kotlin-android'
  23. apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
  24. apply plugin: 'com.google.gms.google-services'
  25. apply plugin: 'com.huawei.agconnect'
  26. android {
  27. compileSdkVersion 28
  28. lintOptions {
  29. disable 'InvalidPackage'
  30. }
  31. signingConfigs {
  32. release {
  33. keyAlias 'cyhd'
  34. keyPassword '@)!&8888cyhd'
  35. storeFile file('../cyhdSign')
  36. storePassword '@)!&8888cyhd'
  37. }
  38. }
  39. defaultConfig {
  40. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  41. applicationId "com.cyhd.henhoandroid"
  42. minSdkVersion 21
  43. targetSdkVersion 28
  44. versionCode flutterVersionCode.toInteger()
  45. versionName flutterVersionName
  46. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  47. // manifestPlaceholders = [
  48. // AMAP_KEY : "1fd4e93e3b4b13747da41f484c955fe2", /// 高德地图key
  49. // ]
  50. ndk {
  51. abiFilters 'armeabi-v7a'
  52. }
  53. multiDexEnabled true
  54. manifestPlaceholders = [
  55. JPUSH_PKGNAME : 'com.cyhd.henhoandroid',
  56. JPUSH_APPKEY : "13dd603952a6632d1dd3ac54", // NOTE: JPush 上注册的包名对应的 Appkey.
  57. JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
  58. AMAP_KEY : "1fd4e93e3b4b13747da41f484c955fe2", /// 高德地图key
  59. XIAOMI_APPKEY:"MI-5221829498125",//小米平台注册的appkey
  60. XIAOMI_APPID:"MI-2882303761518294125",//小米平台注册的appid
  61. //
  62. HUAWEI_APPID:"101961905",//华为平台注册的appid
  63. OPPO_APPKEY : "OP-cd9ece5049514019842f54d537068018", // OPPO平台注册的appkey
  64. OPPO_APPID : "OP-30233397", // OPPO平台注册的appid
  65. OPPO_APPSECRET: "OP-您的应用对应OPPO的APPSECRET",//OPPO平台注册的appsecret
  66. //
  67. // MEIZU_APPKEY:"MZ-您的应用对应的魅族appkey",//魅族平台注册的appkey
  68. // MEIZU_APPID:"MZ-您的应用对应魅族的appid",//魅族平台注册的appid
  69. ]
  70. }
  71. buildTypes {
  72. release {
  73. // minifyEnabled true //混淆
  74. // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  75. // shrinkResources false
  76. signingConfig signingConfigs.release
  77. minifyEnabled false
  78. shrinkResources false
  79. }
  80. debug {
  81. signingConfig signingConfigs.release
  82. minifyEnabled false
  83. shrinkResources false
  84. }
  85. }
  86. }
  87. flutter {
  88. source '../..'
  89. }
  90. subprojects {
  91. if (project.hasProperty("android")) {
  92. android {
  93. compileSdkVersion 28
  94. }
  95. }
  96. project.configurations.all {
  97. resolutionStrategy.eachDependency { details ->
  98. if (details.requested.group == 'com.android.support'
  99. && !details.requested.name.contains('multidex') ) {
  100. details.useVersion "27.1.1"
  101. }
  102. if (details.requested.group == 'androidx.core'
  103. && !details.requested.name.contains('androidx') ) {
  104. }
  105. }
  106. }
  107. }
  108. dependencies {
  109. testImplementation 'junit:junit:4.12'
  110. androidTestImplementation 'com.android.support.test:runner:1.0.2'
  111. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  112. //implementation 'com.amap.api:location:latest.integration'
  113. implementation 'com.android.support:multidex:1.0.3'
  114. //接入厂商推送-跟jpush插件版本要配套
  115. implementation 'cn.jiguang.sdk.plugin:xiaomi:3.3.4'
  116. // implementation 'cn.jiguang.sdk.plugin:huawei:3.3.4'
  117. implementation 'com.huawei.hms:push:3.0.3.301'
  118. implementation files('src/main/libs/jpush-android-plugin-huawei-v3.5.4.jar')
  119. // implementation'cn.jiguang.sdk.plugin:meizu:3.4.1'//JPushSDK3.4.1
  120. implementation 'com.google.firebase:firebase-messaging:17.3.4'
  121. implementation files('src/main/libs/jpush-android-plugin-fcm-v3.5.4.jar')
  122. implementation 'cn.jiguang.sdk.plugin:oppo:3.3.4'
  123. compile "androidx.core:core-ktx:+"
  124. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  125. }
  126. repositories {
  127. mavenCentral()
  128. }