build.gradle 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. buildscript {
  2. ext.kotlin_version = '1.1.51'
  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.0.1'
  10. //noinspection GradleDynamicVersion
  11. classpath 'io.fabric.tools:gradle:1.+'
  12. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  13. }
  14. }
  15. allprojects {
  16. repositories {
  17. jcenter()
  18. }
  19. }
  20. repositories {
  21. mavenLocal()
  22. mavenCentral()
  23. maven { url 'https://maven.fabric.io/public' }
  24. google()
  25. }
  26. apply plugin: 'com.android.application'
  27. apply plugin: 'kotlin-android'
  28. apply plugin: 'io.fabric'
  29. dependencies {
  30. implementation('oauth.signpost:signpost-commonshttp4:1.2.1.2') {
  31. exclude group: 'org.apache.httpcomponents'
  32. }
  33. implementation('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
  34. transitive = true;
  35. }
  36. implementation 'commons-io:commons-io:2.5'
  37. implementation 'com.squareup:otto:1.3.4'
  38. implementation 'com.google.zxing:android-integration:2.3.0'
  39. implementation 'com.android.support:support-annotations:26.1.0'
  40. implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
  41. // Required for local unit tests (JUnit 4 framework)
  42. testCompile 'junit:junit:4.12'
  43. // Required for instrumented tests
  44. androidTestCompile 'com.android.support:support-annotations:26.1.0'
  45. androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1'
  46. androidTestCompile 'com.android.support.test.espresso:espresso-intents:3.0.1'
  47. androidTestCompile 'com.android.support.test:runner:1.0.1'
  48. androidTestImplementation 'com.android.support.test:runner:1.0.1'
  49. androidTestUtil 'com.android.support.test:orchestrator:1.0.1'
  50. }
  51. def keystorePropertiesFile = rootProject.file("keystore.properties")
  52. def keystoreProperties = new Properties()
  53. keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
  54. def testPropertiesFile = rootProject.file("test.properties")
  55. def testProperties = new Properties()
  56. testProperties.load(new FileInputStream(testPropertiesFile))
  57. testProperties.putAll(gradle.getStartParameter().getProjectProperties())
  58. android {
  59. compileSdkVersion 26
  60. buildToolsVersion "26.0.2"
  61. useLibrary 'org.apache.http.legacy'
  62. defaultConfig {
  63. versionCode 1451
  64. versionName "1.4.5.1"
  65. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  66. }
  67. testOptions {
  68. execution 'ANDROID_TEST_ORCHESTRATOR'
  69. }
  70. flavorDimensions "store"
  71. productFlavors {
  72. amazon {
  73. dimension "store"
  74. }
  75. google {
  76. dimension "store"
  77. }
  78. }
  79. signingConfigs {
  80. release {
  81. keyAlias keystoreProperties.getProperty('keyAlias', '')
  82. keyPassword keystoreProperties.getProperty('keyPassword', '')
  83. storeFile file(keystoreProperties.getProperty('storeFile', 'dummy'))
  84. storePassword keystoreProperties.getProperty('storePassword', '')
  85. }
  86. }
  87. buildTypes {
  88. release {
  89. zipAlignEnabled true
  90. signingConfig signingConfigs.release
  91. minifyEnabled true
  92. }
  93. debug {
  94. buildConfigField("String", "TEST_USER_ID", "\"${testProperties.testUserId}\"")
  95. buildConfigField("String", "TEST_USER_KEY_READONLY", "\"${testProperties.testUserKeyReadonly}\"")
  96. }
  97. }
  98. lintOptions {
  99. abortOnError false
  100. }
  101. packagingOptions {
  102. exclude 'META-INF/LICENSE.txt'
  103. }
  104. }
  105. task wrapper(type: Wrapper) {
  106. gradleVersion = '4.2.1'
  107. }