build.gradle 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  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="036I"
  12. brandCode="000A"
  13. model="1039"
  14. }
  15. android {
  16. compileSdk 31
  17. lintOptions {
  18. checkReleaseBuilds false
  19. }
  20. defaultConfig {
  21. applicationId "com.develop.foodcooking"
  22. minSdk 21
  23. targetSdk 31
  24. versionCode project.ext.versionCode
  25. versionName "${project.ext.model}.${project.ext.brandCode}.${project.ext.versionCode}"
  26. archivesBaseName = "cofar-cooking_${versionName}"
  27. javaCompileOptions {
  28. annotationProcessorOptions {
  29. arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
  30. }
  31. }
  32. ndk {
  33. abiFilters 'armeabi-v7a'
  34. }
  35. packagingOptions {
  36. pickFirst 'lib/armeabi-v7a/libc++_shared.so'
  37. }
  38. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  39. kapt {
  40. arguments {
  41. arg("AROUTER_MODULE_NAME", project.getName())
  42. arg("room.schemaLocation", "$projectDir/schemas".toString())
  43. }
  44. }
  45. multiDexEnabled true
  46. }
  47. flavorDimensions "platform"
  48. productFlavors {
  49. brand000ATuya {
  50. dimension "platform"
  51. applicationId "com.develop.foodcooking"
  52. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  53. resValue("string", "app_theme", "@style/SplashTheme")
  54. buildConfigField("String", "model", "\"1039\"")
  55. buildConfigField("String", "brandCode", "\"000A\"")
  56. //appCode 1.01 指向bug修复,2.01指向功能变更
  57. buildConfigField("String", "appCode", "\"1.01\"")
  58. // buildConfigField("String", "appCode", "\"2.01\"")
  59. }
  60. brand045ATuya {
  61. dimension "platform"
  62. applicationId "com.develop.foodcooking"
  63. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  64. resValue("string", "app_theme", "@style/SplashThemeNotLogo")
  65. }
  66. // brand011ATuya {
  67. // dimension "platform"
  68. // applicationId "com.develop.foodcooking"
  69. // buildConfigField("String", "UpdatePlatform", "\"normal\"")
  70. // resValue("string", "app_theme", "@style/Splash007DTheme")
  71. //
  72. // }
  73. brand011ATuya {
  74. dimension "platform"
  75. applicationId "com.develop.foodcooking"
  76. buildConfigField("String", "UpdatePlatform", "\"011A\"")
  77. resValue("string", "app_theme", "@style/Splash011ATheme")
  78. buildConfigField("String", "model", "\"1039\"")
  79. buildConfigField("String", "brandCode", "\"011A\"")
  80. }
  81. brand011A5037Tuya {
  82. dimension "platform"
  83. applicationId "com.develop.foodcooking"
  84. buildConfigField("String", "UpdatePlatform", "\"011A\"")
  85. resValue("string", "app_theme", "@style/Splash011A5037Theme")
  86. buildConfigField("String", "model", "\"5037\"")
  87. buildConfigField("String", "brandCode", "\"011A\"")
  88. }
  89. brand017ATuya {
  90. dimension "platform"
  91. applicationId "com.develop.foodcooking"
  92. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  93. resValue("string", "app_theme", "@style/Splash017Theme")
  94. }
  95. brand030ATuya {
  96. dimension "platform"
  97. applicationId "com.develop.foodcooking"
  98. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  99. resValue("string", "app_theme", "@style/SplashTheme")
  100. buildConfigField("String", "model", "\"1039\"")
  101. buildConfigField("String", "brandCode", "\"030A\"")
  102. //appCode 1.01 指向bug修复,2.01指向功能变更
  103. buildConfigField("String", "appCode", "\"1.01\"")
  104. // buildConfigField("String", "appCode", "\"2.01\"")
  105. }
  106. brand029CTuya {
  107. dimension "platform"
  108. applicationId "com.develop.foodcooking"
  109. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  110. resValue("string", "app_theme", "@style/Splash029CTheme")
  111. }
  112. brand036I {
  113. dimension "platform"
  114. applicationId "com.develop.foodcooking"
  115. buildConfigField("String", "UpdatePlatform", "\"036I\"")
  116. resValue("string", "app_theme", "@style/Splash036IDTheme")
  117. }
  118. brand036ITuya {
  119. dimension "platform"
  120. applicationId "com.develop.foodcooking"
  121. buildConfigField("String", "UpdatePlatform", "\"036I\"")
  122. resValue("string", "app_theme", "@style/Splash036IDTheme")
  123. }
  124. brand000A {
  125. dimension "platform"
  126. applicationId "com.develop.foodcooking"
  127. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  128. resValue("string", "app_theme", "@style/SplashTheme")
  129. buildConfigField("String", "model", "\"1039\"")
  130. buildConfigField("String", "brandCode", "\"000A\"")
  131. }
  132. brand010D {
  133. dimension "platform"
  134. applicationId "com.develop.foodcooking"
  135. buildConfigField("String", "UpdatePlatform", "\"night\"")
  136. resValue("string", "app_theme", "@style/Splash010DTheme")
  137. }
  138. brand030A {
  139. dimension "platform"
  140. applicationId "com.develop.foodcooking"
  141. resValue("string", "app_theme", "@style/SplashTheme")
  142. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  143. buildConfigField("String", "model", "\"1039\"")
  144. buildConfigField("String", "brandCode", "\"030A\"")
  145. //appCode 1.01 指向bug修复,2.01指向功能变更
  146. buildConfigField("String", "appCode", "\"1.01\"")
  147. }
  148. brand032DTuya {
  149. dimension "platform"
  150. applicationId "com.develop.foodcooking"
  151. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  152. resValue("string", "app_theme", "@style/Splash032DTheme")
  153. }
  154. brand032D {
  155. dimension "platform"
  156. applicationId "com.develop.foodcooking"
  157. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  158. resValue("string", "app_theme", "@style/Splash032DTheme")
  159. }
  160. brand002DTuya {
  161. dimension "platform"
  162. applicationId "com.develop.foodcooking"
  163. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  164. resValue("string", "app_theme", "@style/Splash002DTheme")
  165. }
  166. brand007DTuya {
  167. dimension "platform"
  168. applicationId "com.develop.foodcooking"
  169. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  170. resValue("string", "app_theme", "@style/Splash007DTheme")
  171. }
  172. brand054ATuya {
  173. dimension "platform"
  174. applicationId "com.develop.foodcooking"
  175. buildConfigField("String", "UpdatePlatform", "\"054A\"")
  176. resValue("string", "app_theme", "@style/Splash054ATheme")
  177. }
  178. }
  179. signingConfigs {
  180. debug {
  181. storeFile file('..\\signature\\rk.jks')
  182. storePassword '123456'
  183. keyAlias 'rk'
  184. keyPassword '123456'
  185. }
  186. foodCooking {
  187. storeFile file("..\\signature\\rk.jks")
  188. storePassword '123456'
  189. keyAlias 'rk'
  190. keyPassword '123456'
  191. }
  192. release {
  193. storeFile file('..\\signature\\rk.jks')
  194. storePassword '123456'
  195. keyAlias 'rk'
  196. keyPassword '123456'
  197. }
  198. }
  199. buildTypes {
  200. release {
  201. minifyEnabled false
  202. debuggable true
  203. productFlavors.brand010D.signingConfig signingConfigs.release
  204. productFlavors.brand029CTuya.signingConfig signingConfigs.release
  205. productFlavors.brand000ATuya.signingConfig signingConfigs.release
  206. productFlavors.brand030A.signingConfig signingConfigs.release
  207. productFlavors.brand011ATuya.signingConfig signingConfigs.release
  208. productFlavors.brand036ITuya.signingConfig signingConfigs.release
  209. productFlavors.brand030ATuya.signingConfig signingConfigs.release
  210. productFlavors.brand017ATuya.signingConfig signingConfigs.release
  211. productFlavors.brand036I.signingConfig signingConfigs.release
  212. productFlavors.brand000A.signingConfig signingConfigs.release
  213. productFlavors.brand045ATuya.signingConfig signingConfigs.release
  214. productFlavors.brand032DTuya.signingConfig signingConfigs.release
  215. productFlavors.brand032D.signingConfig signingConfigs.release
  216. productFlavors.brand002DTuya.signingConfig signingConfigs.release
  217. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  218. }
  219. debug{
  220. debuggable true
  221. productFlavors.brand032DTuya.signingConfig signingConfigs.debug
  222. // buildConfigField("String", "UpdatePlatform", "\"054A\"")
  223. ////// buildConfigField("String", "FLAVOR", "\"brand054ATuya\"")
  224. // resValue("string", "app_theme", "@style/Splash054ATheme")
  225. // buildConfigField("String", "UpdatePlatform", "\"011A\"")
  226. // resValue("string", "app_theme", "@style/Splash011A5037Theme")
  227. // buildConfigField("String", "model", "\"5037\"")
  228. // buildConfigField("String", "brandCode", "\"011A\"")
  229. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  230. resValue("string", "app_theme", "@style/SplashTheme")
  231. buildConfigField("String", "model", "\"1039\"")
  232. buildConfigField("String", "brandCode", "\"030A\"")
  233. //versionCode 1.01 指向bug修复,2.01指向功能变更
  234. buildConfigField("String", "appCode", "\"1.01\"")
  235. // buildConfigField("String", "appCode", "\"2.01\"")
  236. // resValue("string", "app_theme", "@style/SplashTheme")
  237. // buildConfigField("String", "UpdatePlatform", "\"normal\"")
  238. // buildConfigField("String", "model", "\"5037\"")
  239. // //versionCode 1.01 指向bug修复,2.01指向功能变更
  240. // buildConfigField("String", "appCode", "\"1.01\"")
  241. // buildConfigField("String", "appCode", "\"2.01\"")
  242. }
  243. }
  244. compileOptions {
  245. sourceCompatibility JavaVersion.VERSION_1_8
  246. targetCompatibility JavaVersion.VERSION_1_8
  247. }
  248. kotlinOptions {
  249. jvmTarget = '1.8'
  250. }
  251. viewBinding {
  252. enabled = true
  253. }
  254. }
  255. dependencies {
  256. implementation project(path: ':libBase') //基础工具模块,不涉及业务逻辑
  257. implementation project(path: ':BusinessCommon')//业务相关的基础类
  258. implementation project(path: ':BusinessMain') //烹饪主模块
  259. implementation project(path: ':BusinessAuth')//登录-注册-个人信息模块
  260. implementation project(path: ':BusinessSetting') //设置模块
  261. implementation project(path: ':BusinessStep') //烹饪步骤模块
  262. kapt 'com.alibaba:arouter-compiler:1.5.2'
  263. }