build.gradle 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'kotlin-android'
  3. android {
  4. compileSdkVersion 33
  5. defaultConfig {
  6. applicationId "com.sirekanyan.devtools"
  7. minSdkVersion 17
  8. targetSdkVersion 33
  9. versionCode 1
  10. versionName "1.0"
  11. }
  12. buildTypes {
  13. debug {
  14. applicationIdSuffix ".debug"
  15. }
  16. release {
  17. minifyEnabled false
  18. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')
  19. }
  20. }
  21. compileOptions {
  22. sourceCompatibility JavaVersion.VERSION_1_8
  23. targetCompatibility JavaVersion.VERSION_1_8
  24. }
  25. kotlinOptions {
  26. jvmTarget = "1.8"
  27. }
  28. }
  29. dependencies {
  30. implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
  31. implementation 'androidx.appcompat:appcompat:1.5.1'
  32. implementation 'androidx.core:core-ktx:1.9.0'
  33. }
  34. afterEvaluate {
  35. def grantSystemPermissions = {
  36. exec {
  37. def defaultPackage = android.defaultConfig.applicationId
  38. def debugSuffix = android.buildTypes['debug'].applicationIdSuffix
  39. commandLine('./grant.sh', defaultPackage + debugSuffix)
  40. }
  41. }
  42. assembleDebug.doLast { grantSystemPermissions() }
  43. installDebug.doLast { grantSystemPermissions() }
  44. }