build.gradle 2.9 KB

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