build.gradle 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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 31
  8. defaultConfig {
  9. applicationId "me.yoqi.calculator"
  10. minSdkVersion 16
  11. targetSdkVersion 31
  12. versionCode gitVersion
  13. versionName version
  14. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  15. }
  16. buildTypes {
  17. release {
  18. minifyEnabled true
  19. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  20. }
  21. }
  22. }
  23. dependencies {
  24. implementation fileTree(dir: 'libs', include: ['*.jar'])
  25. implementation 'androidx.appcompat:appcompat:1.1.0'
  26. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  27. testImplementation 'junit:junit:4.12'
  28. androidTestImplementation 'androidx.test:runner:1.2.0'
  29. androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  30. }