build.gradle 3.4 KB

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