build.gradle 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. apply plugin: 'com.android.application'
  2. def cmd = 'git rev-list HEAD --first-parent --count'
  3. def gitVersion = cmd.execute().text.trim().toInteger()
  4. def cmd2 = 'git describe --tags'
  5. def version = cmd2.execute().text.trim()
  6. android {
  7. compileSdkVersion 33
  8. signingConfigs {
  9. release {
  10. storeFile file('Calculator.jks')
  11. storePassword 'hrZSsDXk'
  12. keyAlias 'key0'
  13. keyPassword 'hrZSsDXk'
  14. }
  15. }
  16. defaultConfig {
  17. applicationId "me.yoqi.calculator"
  18. minSdkVersion 21
  19. targetSdkVersion 33
  20. versionCode gitVersion
  21. versionName version
  22. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  23. }
  24. buildTypes {
  25. release {
  26. minifyEnabled true
  27. shrinkResources true
  28. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  29. }
  30. }
  31. }
  32. dependencies {
  33. implementation fileTree(dir: 'libs', include: ['*.jar'])
  34. implementation 'androidx.appcompat:appcompat:1.6.1'
  35. implementation 'com.google.android.material:material:1.9.0'
  36. implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
  37. testImplementation 'junit:junit:4.13.2'
  38. androidTestImplementation 'androidx.test.ext:junit:1.1.5'
  39. androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
  40. }