build.gradle 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. plugins {
  2. id 'com.android.application'
  3. id 'kotlin-android'
  4. id 'kotlin-kapt'
  5. id 'com.google.gms.google-services'
  6. id 'com.google.firebase.crashlytics'
  7. id 'com.google.firebase.firebase-perf'
  8. }
  9. android {
  10. compileSdkVersion 31
  11. buildToolsVersion "31.0.0"
  12. defaultConfig {
  13. applicationId "com.swago.app"
  14. minSdkVersion 21
  15. targetSdkVersion 31
  16. versionCode 1190
  17. versionName "1.1.9.0"
  18. multiDexEnabled true
  19. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  20. kapt {
  21. arguments {
  22. arg("AROUTER_MODULE_NAME", project.getName())
  23. }
  24. }
  25. ndk {
  26. //选择要添加的对应cpu类型的.so库。
  27. abiFilters "armeabi-v7a","arm64-v8a"
  28. }
  29. }
  30. compileOptions {
  31. sourceCompatibility JavaVersion.VERSION_1_8
  32. targetCompatibility JavaVersion.VERSION_1_8
  33. }
  34. kotlinOptions {
  35. jvmTarget = '1.8'
  36. }
  37. buildFeatures{
  38. viewBinding = true
  39. }
  40. signingConfigs {
  41. release {
  42. keyAlias 'swago'
  43. keyPassword 'swago0455com06'
  44. storeFile file('swago.jks')
  45. storePassword 'swago0455com06'
  46. v1SigningEnabled true
  47. v2SigningEnabled true
  48. }
  49. }
  50. buildTypes {
  51. debug {
  52. debuggable true
  53. minifyEnabled false
  54. zipAlignEnabled false
  55. shrinkResources false
  56. signingConfig signingConfigs.release
  57. proguardFiles 'proguard-rules.pro'
  58. firebaseCrashlytics {
  59. mappingFileUploadEnabled false
  60. }
  61. }
  62. release {
  63. debuggable false
  64. minifyEnabled true
  65. zipAlignEnabled true
  66. shrinkResources true
  67. signingConfig signingConfigs.release
  68. proguardFiles 'proguard-rules.pro'
  69. firebaseCrashlytics {
  70. mappingFileUploadEnabled false
  71. }
  72. }
  73. }
  74. android.applicationVariants.all { variant ->
  75. variant.outputs.all {
  76. if (variant.buildType.name == "release") {
  77. outputFileName = "${applicationId}-release-${variant.versionName}.apk"
  78. } else if (variant.buildType.name == 'debug') {
  79. outputFileName = "${applicationId}-debug-${variant.versionName}.apk"
  80. }
  81. }
  82. }
  83. }
  84. dependencies {
  85. implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
  86. implementation 'androidx.appcompat:appcompat:1.2.0'
  87. implementation 'com.google.android.material:material:1.2.1'
  88. testImplementation 'junit:junit:4.+'
  89. implementation 'androidx.core:core-ktx:1.5.0'
  90. androidTestImplementation 'androidx.test.ext:junit:1.1.2'
  91. androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  92. implementation project(path: ':baseswago')
  93. implementation project(path: ':login')
  94. implementation project(path: ':user')
  95. implementation project(path: ':home')
  96. implementation project(path: ':tuikit')
  97. implementation project(path: ':room')
  98. kapt "com.alibaba:arouter-compiler:1.2.2"
  99. }