build.gradle 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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="010D"
  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. brand011ATuya {
  55. dimension "platform"
  56. applicationId "com.develop.foodcooking"
  57. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  58. resValue("string", "app_theme", "@style/SplashTheme")
  59. }
  60. brand017ATuya {
  61. dimension "platform"
  62. applicationId "com.develop.foodcooking"
  63. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  64. resValue("string", "app_theme", "@style/Splash017Theme")
  65. }
  66. brand030ATuya {
  67. dimension "platform"
  68. applicationId "com.develop.foodcooking"
  69. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  70. resValue("string", "app_theme", "@style/SplashTheme")
  71. }
  72. brand036I {
  73. dimension "platform"
  74. applicationId "com.develop.foodcooking"
  75. buildConfigField("String", "UpdatePlatform", "\"night\"")
  76. resValue("string", "app_theme", "@style/SplashTheme")
  77. }
  78. brand036ITuya {
  79. dimension "platform"
  80. applicationId "com.develop.foodcooking"
  81. buildConfigField("String", "UpdatePlatform", "\"night\"")
  82. resValue("string", "app_theme", "@style/SplashTheme")
  83. }
  84. brand000A {
  85. dimension "platform"
  86. applicationId "com.develop.foodcooking"
  87. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  88. resValue("string", "app_theme", "@style/SplashTheme")
  89. buildConfigField("String", "UpdatePlatform", "\"036I\"")
  90. resValue("string", "app_theme", "@style/Splash036IDTheme")
  91. }
  92. brand010D {
  93. dimension "platform"
  94. applicationId "com.develop.foodcooking"
  95. buildConfigField("String", "UpdatePlatform", "\"night\"")
  96. resValue("string", "app_theme", "@style/Splash010DTheme")
  97. }
  98. brand030A {
  99. dimension "platform"
  100. applicationId "com.develop.foodcooking"
  101. buildConfigField("String", "UpdatePlatform", "\"036I\"")
  102. resValue("string", "app_theme", "@style/SplashTheme")
  103. resValue("string", "app_theme", "@style/Splash036IDTheme")
  104. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  105. }
  106. }
  107. signingConfigs {
  108. debug {
  109. storeFile file('..\\signature\\rk.jks')
  110. storePassword '123456'
  111. keyAlias 'rk'
  112. keyPassword '123456'
  113. }
  114. foodCooking {
  115. storeFile file("..\\signature\\rk.jks")
  116. storePassword '123456'
  117. keyAlias 'rk'
  118. keyPassword '123456'
  119. }
  120. release {
  121. storeFile file('..\\signature\\rk.jks')
  122. storePassword '123456'
  123. keyAlias 'rk'
  124. keyPassword '123456'
  125. }
  126. }
  127. buildTypes {
  128. release {
  129. minifyEnabled false
  130. productFlavors.brand010D.signingConfig signingConfigs.release
  131. productFlavors.brand000ATuya.signingConfig signingConfigs.release
  132. productFlavors.brand030A.signingConfig signingConfigs.release
  133. productFlavors.brand011ATuya.signingConfig signingConfigs.release
  134. productFlavors.brand036ITuya.signingConfig signingConfigs.release
  135. productFlavors.brand030ATuya.signingConfig signingConfigs.release
  136. productFlavors.brand017ATuya.signingConfig signingConfigs.release
  137. productFlavors.brand036I.signingConfig signingConfigs.release
  138. productFlavors.brand000A.signingConfig signingConfigs.release
  139. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  140. }
  141. }
  142. compileOptions {
  143. sourceCompatibility JavaVersion.VERSION_1_8
  144. targetCompatibility JavaVersion.VERSION_1_8
  145. }
  146. kotlinOptions {
  147. jvmTarget = '1.8'
  148. }
  149. viewBinding {
  150. enabled = true
  151. }
  152. }
  153. dependencies {
  154. implementation project(path: ':libBase') //基础工具模块,不涉及业务逻辑
  155. implementation project(path: ':BusinessCommon')//业务相关的基础类
  156. implementation project(path: ':BusinessMain') //烹饪主模块
  157. implementation project(path: ':BusinessAuth')//登录-注册-个人信息模块
  158. implementation project(path: ':BusinessSetting') //设置模块
  159. implementation project(path: ':BusinessStep') //烹饪步骤模块
  160. kapt 'com.alibaba:arouter-compiler:1.5.2'
  161. }