build.gradle 1.3 KB

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