build.gradle 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. plugins {
  2. id 'com.android.application'
  3. }
  4. def build = rootProject.ext.build
  5. def sign = rootProject.ext.sign
  6. android {
  7. signingConfigs {
  8. release {
  9. storeFile file(sign.storeFile)
  10. keyAlias sign.keyAlias
  11. keyPassword sign.keyPassword
  12. storePassword sign.storePassword
  13. }
  14. }
  15. compileSdkVersion build.compileSdkVersion
  16. defaultConfig {
  17. applicationId build.applicationId
  18. minSdkVersion build.minSdkVersion
  19. targetSdkVersion build.targetSdkVersion
  20. versionCode build.versionCode
  21. versionName build.versionName
  22. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  23. }
  24. buildTypes {
  25. release {
  26. minifyEnabled true
  27. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  28. signingConfig signingConfigs.release
  29. }
  30. }
  31. compileOptions {
  32. sourceCompatibility JavaVersion.VERSION_1_8
  33. targetCompatibility JavaVersion.VERSION_1_8
  34. }
  35. }
  36. dependencies {
  37. implementation 'androidx.appcompat:appcompat:1.2.0'
  38. implementation 'com.google.android.material:material:1.2.1'
  39. implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  40. // 条码二维码
  41. implementation project(path: ':zxingscanview')
  42. testImplementation 'junit:junit:4.+'
  43. androidTestImplementation 'androidx.test.ext:junit:1.1.2'
  44. androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  45. }