build.gradle 5.2 KB

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