build.gradle 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. import java.text.SimpleDateFormat
  2. plugins {
  3. id 'com.android.application'
  4. id 'org.jetbrains.kotlin.android'
  5. id 'kotlin-kapt'
  6. id 'kotlinx-serialization'
  7. }
  8. ext{
  9. versionCode=Integer.parseInt(new SimpleDateFormat("yyMMddHH").format(new Date()) + 1)
  10. // versionCode=230617180
  11. brandCode="017A"
  12. model="1039"
  13. }
  14. android {
  15. compileSdk 31
  16. lintOptions {
  17. checkReleaseBuilds false
  18. }
  19. defaultConfig {
  20. applicationId "com.develop.foodcooking"
  21. minSdk 21
  22. targetSdk 30
  23. versionCode project.ext.versionCode
  24. versionName "${project.ext.model}.${project.ext.brandCode}.${project.ext.versionCode}"
  25. archivesBaseName = "cofar-cooking_${versionName}"
  26. javaCompileOptions {
  27. annotationProcessorOptions {
  28. arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
  29. }
  30. }
  31. ndk {
  32. abiFilters 'armeabi-v7a'
  33. }
  34. packagingOptions {
  35. pickFirst 'lib/armeabi-v7a/libc++_shared.so'
  36. }
  37. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  38. kapt {
  39. arguments {
  40. arg("AROUTER_MODULE_NAME", project.getName())
  41. arg("room.schemaLocation", "$projectDir/schemas".toString())
  42. }
  43. }
  44. multiDexEnabled true
  45. }
  46. flavorDimensions "platform"
  47. productFlavors {
  48. brand000ATuya {
  49. dimension "platform"
  50. applicationId "com.develop.foodcooking"
  51. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  52. resValue("string", "app_theme", "@style/SplashTheme")
  53. }
  54. brand045ATuya {
  55. dimension "platform"
  56. applicationId "com.develop.foodcooking"
  57. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  58. resValue("string", "app_theme", "@style/SplashTheme")
  59. }
  60. brand011ATuya {
  61. dimension "platform"
  62. applicationId "com.develop.foodcooking"
  63. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  64. resValue("string", "app_theme", "@style/SplashTheme")
  65. }
  66. brand017ATuya {
  67. dimension "platform"
  68. applicationId "com.develop.foodcooking"
  69. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  70. resValue("string", "app_theme", "@style/Splash017Theme")
  71. }
  72. brand030ATuya {
  73. dimension "platform"
  74. applicationId "com.develop.foodcooking"
  75. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  76. resValue("string", "app_theme", "@style/SplashTheme")
  77. }
  78. brand029CTuya {
  79. dimension "platform"
  80. applicationId "com.develop.foodcooking"
  81. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  82. resValue("string", "app_theme", "@style/Splash029CTheme")
  83. }
  84. brand036I {
  85. dimension "platform"
  86. applicationId "com.develop.foodcooking"
  87. buildConfigField("String", "UpdatePlatform", "\"night\"")
  88. resValue("string", "app_theme", "@style/SplashTheme")
  89. }
  90. brand036ITuya {
  91. dimension "platform"
  92. applicationId "com.develop.foodcooking"
  93. buildConfigField("String", "UpdatePlatform", "\"night\"")
  94. resValue("string", "app_theme", "@style/SplashTheme")
  95. }
  96. brand000A {
  97. dimension "platform"
  98. applicationId "com.develop.foodcooking"
  99. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  100. resValue("string", "app_theme", "@style/SplashTheme")
  101. buildConfigField("String", "UpdatePlatform", "\"036I\"")
  102. resValue("string", "app_theme", "@style/Splash036IDTheme")
  103. }
  104. brand010D {
  105. dimension "platform"
  106. applicationId "com.develop.foodcooking"
  107. buildConfigField("String", "UpdatePlatform", "\"night\"")
  108. resValue("string", "app_theme", "@style/Splash010DTheme")
  109. }
  110. brand030A {
  111. dimension "platform"
  112. applicationId "com.develop.foodcooking"
  113. buildConfigField("String", "UpdatePlatform", "\"036I\"")
  114. resValue("string", "app_theme", "@style/SplashTheme")
  115. resValue("string", "app_theme", "@style/Splash036IDTheme")
  116. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  117. }
  118. brand032DTuya {
  119. dimension "platform"
  120. applicationId "com.develop.foodcooking"
  121. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  122. resValue("string", "app_theme", "@style/Splash032DTheme")
  123. }
  124. brand002DTuya {
  125. dimension "platform"
  126. applicationId "com.develop.foodcooking"
  127. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  128. resValue("string", "app_theme", "@style/Splash002DTheme")
  129. }
  130. }
  131. signingConfigs {
  132. debug {
  133. storeFile file('..\\signature\\rk.jks')
  134. storePassword '123456'
  135. keyAlias 'rk'
  136. keyPassword '123456'
  137. }
  138. foodCooking {
  139. storeFile file("..\\signature\\rk.jks")
  140. storePassword '123456'
  141. keyAlias 'rk'
  142. keyPassword '123456'
  143. }
  144. release {
  145. storeFile file('..\\signature\\rk.jks')
  146. storePassword '123456'
  147. keyAlias 'rk'
  148. keyPassword '123456'
  149. }
  150. }
  151. buildTypes {
  152. release {
  153. minifyEnabled false
  154. productFlavors.brand010D.signingConfig signingConfigs.release
  155. productFlavors.brand029CTuya.signingConfig signingConfigs.release
  156. productFlavors.brand000ATuya.signingConfig signingConfigs.release
  157. productFlavors.brand030A.signingConfig signingConfigs.release
  158. productFlavors.brand011ATuya.signingConfig signingConfigs.release
  159. productFlavors.brand036ITuya.signingConfig signingConfigs.release
  160. productFlavors.brand030ATuya.signingConfig signingConfigs.release
  161. productFlavors.brand017ATuya.signingConfig signingConfigs.release
  162. productFlavors.brand036I.signingConfig signingConfigs.release
  163. productFlavors.brand000A.signingConfig signingConfigs.release
  164. productFlavors.brand045ATuya.signingConfig signingConfigs.release
  165. productFlavors.brand032DTuya.signingConfig signingConfigs.release
  166. productFlavors.brand002DTuya.signingConfig signingConfigs.release
  167. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  168. }
  169. }
  170. compileOptions {
  171. sourceCompatibility JavaVersion.VERSION_1_8
  172. targetCompatibility JavaVersion.VERSION_1_8
  173. }
  174. kotlinOptions {
  175. jvmTarget = '1.8'
  176. }
  177. viewBinding {
  178. enabled = true
  179. }
  180. }
  181. dependencies {
  182. implementation project(path: ':libBase') //基础工具模块,不涉及业务逻辑
  183. implementation project(path: ':BusinessCommon')//业务相关的基础类
  184. implementation project(path: ':BusinessMain') //烹饪主模块
  185. implementation project(path: ':BusinessAuth')//登录-注册-个人信息模块
  186. implementation project(path: ':BusinessSetting') //设置模块
  187. implementation project(path: ':BusinessStep') //烹饪步骤模块
  188. kapt 'com.alibaba:arouter-compiler:1.5.2'
  189. }