build.gradle 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. buildscript {
  2. ext.kotlin_version = '1.1.60'
  3. repositories {
  4. jcenter()
  5. maven { url 'https://maven.fabric.io/public' }
  6. google()
  7. }
  8. dependencies {
  9. classpath 'com.android.tools.build:gradle:3.1.0-alpha04'
  10. //noinspection GradleDynamicVersion
  11. classpath 'io.fabric.tools:gradle:1.+'
  12. //noinspection DifferentKotlinGradleVersion
  13. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  14. }
  15. }
  16. allprojects {
  17. repositories {
  18. jcenter()
  19. }
  20. }
  21. repositories {
  22. mavenLocal()
  23. mavenCentral()
  24. maven { url 'https://maven.fabric.io/public' }
  25. maven { url 'https://jitpack.io' }
  26. google()
  27. }
  28. apply plugin: 'com.android.application'
  29. apply plugin: 'kotlin-android'
  30. apply plugin: 'io.fabric'
  31. apply plugin: 'org.jetbrains.kotlin.android.extensions'
  32. apply plugin: 'kotlin-kapt'
  33. androidExtensions {
  34. experimental = true
  35. }
  36. dependencies {
  37. implementation('oauth.signpost:signpost-commonshttp4:1.2.1.2') {
  38. exclude group: 'org.apache.httpcomponents'
  39. }
  40. implementation('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
  41. transitive = true;
  42. }
  43. implementation 'commons-io:commons-io:2.5'
  44. implementation 'com.squareup:otto:1.3.4'
  45. implementation 'com.google.zxing:android-integration:2.3.0'
  46. implementation 'com.github.blocoio:faker:1.0.1'
  47. implementation 'com.android.support:support-annotations:27.0.1'
  48. implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
  49. implementation 'com.android.support:support-v4:27.0.1'
  50. implementation 'com.android.support:design:27.0.1'
  51. implementation 'com.android.support:appcompat-v7:27.0.1'
  52. implementation 'com.android.support:recyclerview-v7:27.0.1'
  53. implementation 'com.android.support:cardview-v7:27.0.1'
  54. implementation 'com.android.support.constraint:constraint-layout:1.0.2'
  55. kapt 'com.android.databinding:compiler:3.1.0-alpha04'
  56. testImplementation 'junit:junit:4.12'
  57. // Required for instrumented tests
  58. androidTestImplementation 'com.android.support:support-annotations:27.0.1'
  59. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
  60. androidTestImplementation 'com.android.support.test.espresso:espresso-intents:3.0.1'
  61. androidTestImplementation 'com.android.support.test:runner:1.0.1'
  62. androidTestUtil 'com.android.support.test:orchestrator:1.0.1'
  63. }
  64. def keystorePropertiesFile = rootProject.file("keystore.properties")
  65. def keystoreProperties = new Properties()
  66. keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
  67. def testPropertiesFile = rootProject.file("test.properties")
  68. def testProperties = new Properties()
  69. testProperties.load(new FileInputStream(testPropertiesFile))
  70. android {
  71. compileSdkVersion 27
  72. buildToolsVersion "27.0.1"
  73. useLibrary 'org.apache.http.legacy'
  74. dataBinding {
  75. enabled = true
  76. }
  77. defaultConfig {
  78. versionCode 1451
  79. versionName "1.4.5.1"
  80. minSdkVersion 14
  81. targetSdkVersion 27
  82. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  83. }
  84. testOptions {
  85. execution 'ANDROID_TEST_ORCHESTRATOR'
  86. }
  87. flavorDimensions "store"
  88. productFlavors {
  89. amazon {
  90. dimension "store"
  91. }
  92. google {
  93. dimension "store"
  94. }
  95. }
  96. signingConfigs {
  97. release {
  98. keyAlias keystoreProperties.getProperty('keyAlias', '')
  99. keyPassword keystoreProperties.getProperty('keyPassword', '')
  100. storeFile file(keystoreProperties.getProperty('storeFile', 'dummy'))
  101. storePassword keystoreProperties.getProperty('storePassword', '')
  102. }
  103. }
  104. buildTypes {
  105. release {
  106. zipAlignEnabled true
  107. signingConfig signingConfigs.release
  108. minifyEnabled true
  109. }
  110. debug {
  111. buildConfigField("String", "TEST_USER_ID", "\"${testProperties.testUserId}\"")
  112. buildConfigField("String", "TEST_USER_KEY_READONLY", "\"${testProperties.testUserKeyReadonly}\"")
  113. }
  114. }
  115. lintOptions {
  116. abortOnError false
  117. }
  118. packagingOptions {
  119. exclude 'META-INF/LICENSE.txt'
  120. }
  121. }
  122. task wrapper(type: Wrapper) {
  123. gradleVersion = '4.2.1'
  124. }
  125. apply plugin: 'kotlin-android-extensions'