build.gradle 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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="030A"
  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. }
  47. brand030A {
  48. dimension "platform"
  49. applicationId "com.develop.foodcooking"
  50. buildConfigField("String", "UpdatePlatform", "\"normal\"")
  51. }
  52. }
  53. signingConfigs {
  54. debug {
  55. storeFile file('..\\signature\\rk.jks')
  56. storePassword '123456'
  57. keyAlias 'rk'
  58. keyPassword '123456'
  59. }
  60. foodCooking {
  61. storeFile file("..\\signature\\rk.jks")
  62. storePassword '123456'
  63. keyAlias 'rk'
  64. keyPassword '123456'
  65. }
  66. release {
  67. storeFile file('..\\signature\\rk.jks')
  68. storePassword '123456'
  69. keyAlias 'rk'
  70. keyPassword '123456'
  71. }
  72. }
  73. buildTypes {
  74. release {
  75. minifyEnabled false
  76. productFlavors.brand010D.signingConfig signingConfigs.release
  77. productFlavors.brand030A.signingConfig signingConfigs.release
  78. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  79. }
  80. }
  81. compileOptions {
  82. sourceCompatibility JavaVersion.VERSION_1_8
  83. targetCompatibility JavaVersion.VERSION_1_8
  84. }
  85. kotlinOptions {
  86. jvmTarget = '1.8'
  87. }
  88. viewBinding {
  89. enabled = true
  90. }
  91. }
  92. dependencies {
  93. implementation project(path: ':libBase') //基础工具模块,不涉及业务逻辑
  94. implementation project(path: ':BusinessCommon')//业务相关的基础类
  95. implementation project(path: ':BusinessMain') //烹饪主模块
  96. implementation project(path: ':BusinessAuth')//登录-注册-个人信息模块
  97. implementation project(path: ':BusinessSetting') //设置模块
  98. implementation project(path: ':BusinessStep') //烹饪步骤模块
  99. kapt 'com.alibaba:arouter-compiler:1.5.2'
  100. }