build.gradle 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  32. kapt {
  33. arguments {
  34. arg("AROUTER_MODULE_NAME", project.getName())
  35. arg("room.schemaLocation", "$projectDir/schemas".toString())
  36. }
  37. }
  38. multiDexEnabled true
  39. }
  40. flavorDimensions "platform"
  41. productFlavors {
  42. brand010D {
  43. dimension "platform"
  44. applicationId "com.develop.foodcooking"
  45. buildConfigField("String", "UpdatePlatform", "\"night\"")
  46. resValue("string", "app_theme", "@style/Splash010DTheme")
  47. }
  48. brand030A {
  49. dimension "platform"
  50. applicationId "com.develop.foodcooking"
  51. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  52. resValue("string", "app_theme", "@style/SplashTheme")
  53. }
  54. brand036I {
  55. dimension "platform"
  56. applicationId "com.develop.foodcooking"
  57. buildConfigField("String", "UpdatePlatform", "\"036I\"")
  58. resValue("string", "app_theme", "@style/Splash036IDTheme")
  59. }
  60. }
  61. signingConfigs {
  62. debug {
  63. storeFile file('..\\signature\\rk.jks')
  64. storePassword '123456'
  65. keyAlias 'rk'
  66. keyPassword '123456'
  67. }
  68. foodCooking {
  69. storeFile file("..\\signature\\rk.jks")
  70. storePassword '123456'
  71. keyAlias 'rk'
  72. keyPassword '123456'
  73. }
  74. release {
  75. storeFile file('..\\signature\\rk.jks')
  76. storePassword '123456'
  77. keyAlias 'rk'
  78. keyPassword '123456'
  79. }
  80. }
  81. buildTypes {
  82. release {
  83. minifyEnabled false
  84. productFlavors.brand010D.signingConfig signingConfigs.release
  85. productFlavors.brand030A.signingConfig signingConfigs.release
  86. productFlavors.brand036I.signingConfig signingConfigs.release
  87. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  88. }
  89. }
  90. compileOptions {
  91. sourceCompatibility JavaVersion.VERSION_1_8
  92. targetCompatibility JavaVersion.VERSION_1_8
  93. }
  94. kotlinOptions {
  95. jvmTarget = '1.8'
  96. }
  97. viewBinding {
  98. enabled = true
  99. }
  100. }
  101. dependencies {
  102. implementation project(path: ':libBase') //基础工具模块,不涉及业务逻辑
  103. implementation project(path: ':BusinessCommon')//业务相关的基础类
  104. implementation project(path: ':BusinessMain') //烹饪主模块
  105. implementation project(path: ':BusinessAuth')//登录-注册-个人信息模块
  106. implementation project(path: ':BusinessSetting') //设置模块
  107. implementation project(path: ':BusinessStep') //烹饪步骤模块
  108. kapt 'com.alibaba:arouter-compiler:1.5.2'
  109. }