Guest User

Untitled

a guest
Nov 14th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. ext {
  2. appVersionName = '1.0'
  3. appPackageId = '<AppID>'
  4. }
  5.  
  6. android {
  7. compileSdkVersion 25
  8. buildToolsVersion "25.0.2"
  9.  
  10. defaultConfig {
  11. applicationId "$appPackageId"
  12. minSdkVersion 19
  13. targetSdkVersion 25
  14. versionCode 1
  15. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  16. }
  17. signingConfigs {
  18. debug {
  19. storeFile file("<DebugKeyStoreLocation>")
  20. }
  21. release {
  22. storeFile file("<ReleaseKeyStoreLocation>")
  23. storePassword "<ReleaseKeyStorePassword>"
  24. keyAlias "<KeyAlias>"
  25. keyPassword "<KeyPassword>"
  26. }
  27. }
  28.  
  29. buildTypes {
  30. debug {
  31. minifyEnabled false
  32. useProguard false
  33. proguardFiles getDefaultProguardFile ('proguard-android.txt'), 'proguard-rules.pro'
  34. signingConfig signingConfigs.debug
  35. }
  36. release {
  37. minifyEnabled true
  38. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  39. signingConfig signingConfigs.release
  40. }
  41. }
  42.  
  43. productFlavors {
  44. debug {
  45. applicationId "$appPackageId" + ".debug"
  46. versionName "$appVersionName"
  47. }
  48.  
  49. staging {
  50. applicationId "$appPackageId" + ".staging"
  51. versionName "$appVersionName"
  52. }
  53.  
  54. production {
  55. applicationId "$appPackageId"
  56. versionName "$appVersionName"
  57. }
  58. }
  59.  
  60. applicationVariants.all { variant ->
  61. variant.outputs.each { output ->
  62. //noinspection GroovyAssignabilityCheck
  63. output.outputFile = new File(output.outputFile.parent,
  64. output.outputFile.name.replace(".apk", "-${variant.versionName}.apk"))
  65. }
  66. }
  67. }
Add Comment
Please, Sign In to add comment