build.gradle 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. plugins {
  2. id 'com.android.application'
  3. id 'kotlin-android'
  4. id 'kotlin-kapt'
  5. }
  6. android {
  7. signingConfigs {
  8. debug {
  9. File strFile = new File("debug.keystore")
  10. storeFile file(strFile)
  11. }
  12. debug_g6s {
  13. storeFile file("watch_g6s.keystore")
  14. storePassword "111111"
  15. keyAlias "watch"
  16. keyPassword "111111"
  17. }
  18. }
  19. compileSdkVersion target_sdk_version
  20. buildToolsVersion build_tools_version
  21. aaptOptions.noCompress("mp3","wav")
  22. defaultConfig {
  23. if (rootProject.ext.watch_type == "g6s") {
  24. //g6s腕表
  25. applicationId "com.health.watch"
  26. } else if (rootProject.ext.watch_type == "asr"){
  27. //asr腕表
  28. applicationId "com.wdkl.app.ncs"
  29. //applicationId "com.sgtc.launcher"
  30. } else {
  31. //通用腕表
  32. applicationId "com.wdkl.app.ncs"
  33. }
  34. minSdkVersion min_sdk_version
  35. targetSdkVersion target_sdk_version
  36. versionCode app_version_code
  37. versionName app_version
  38. multiDexEnabled true
  39. dataBinding {
  40. enabled = true
  41. }
  42. ndk {
  43. //选择要添加的对应cpu类型的.so库。
  44. //abiFilters 'armeabi', 'armeabi-v7a', 'armeabi-v8a', 'x86', 'x86_64', 'mips', 'mips64'
  45. abiFilters 'armeabi', 'armeabi-v7a', 'armeabi-v8a'
  46. }
  47. }
  48. compileOptions {
  49. sourceCompatibility JavaVersion.VERSION_1_8
  50. targetCompatibility JavaVersion.VERSION_1_8
  51. }
  52. buildTypes {
  53. release {
  54. if ("yd_watch_2" == app_device_type) {
  55. if (rootProject.ext.watch_type == "g6s" || rootProject.ext.watch_type == "asr") {
  56. signingConfig signingConfigs.debug_g6s
  57. } else {
  58. signingConfig signingConfigs.debug
  59. }
  60. } else {
  61. signingConfig signingConfigs.debug
  62. }
  63. minifyEnabled false
  64. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  65. }
  66. debug {
  67. if ("yd_watch_2" == app_device_type) {
  68. if (rootProject.ext.watch_type == "g6s" || rootProject.ext.watch_type == "asr") {
  69. signingConfig signingConfigs.debug_g6s
  70. } else {
  71. signingConfig signingConfigs.debug
  72. }
  73. } else {
  74. signingConfig signingConfigs.debug
  75. }
  76. minifyEnabled false
  77. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  78. }
  79. }
  80. sourceSets {
  81. main.java.srcDirs += 'src/main/code'
  82. if ("yd_watch_2" == app_device_type) {
  83. if (rootProject.ext.watch_type == "g6s" || rootProject.ext.watch_type == "asr") {
  84. main.manifest.srcFile 'src/main/sharedUserId/AndroidManifest.xml'
  85. } else {
  86. main.manifest.srcFile 'src/main/AndroidManifest.xml'
  87. }
  88. } else if ("yd_w_gionee_2" == app_device_type || "yd_w_gionee_2_chile" == app_device_type) {
  89. main.manifest.srcFile 'src/main/gionee/AndroidManifest.xml'
  90. } else {
  91. main.manifest.srcFile 'src/main/AndroidManifest.xml'
  92. }
  93. }
  94. lintOptions{
  95. checkReleaseBuilds false
  96. abortOnError false
  97. }
  98. dexOptions {
  99. javaMaxHeapSize "4g"
  100. jumboMode=true
  101. preDexLibraries=true
  102. threadCount=8
  103. }
  104. }
  105. dependencies {
  106. implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
  107. implementation 'androidx.core:core-ktx:1.3.1'
  108. implementation 'androidx.appcompat:appcompat:1.2.0'
  109. implementation 'com.google.android.material:material:1.2.1'
  110. implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
  111. testImplementation 'junit:junit:4.+'
  112. androidTestImplementation 'androidx.test.ext:junit:1.1.2'
  113. androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  114. implementation project(':middleware')
  115. implementation project(':android_mobile')
  116. implementation project(':keepalive')
  117. }
  118. ///**
  119. // * kawo组件化框架配置
  120. // */
  121. //kawo {
  122. // /**
  123. // * Aop注解排除Jar
  124. // */
  125. // aspectExcludeJarFilter 'com.enation.geamtear.pay','AlipaySdk'
  126. //}
  127. //