build.gradle 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'kotlin-android'
  3. apply plugin: 'kotlin-android-extensions'
  4. apply plugin: 'kotlin-kapt'
  5. def getGitSha = { ->
  6. def stdout = new ByteArrayOutputStream()
  7. exec {
  8. commandLine 'cmd', 'git', 'rev-parse', '--short', 'HEAD'
  9. standardOutput = stdout
  10. }
  11. return stdout.toString().trim()
  12. }
  13. android {
  14. compileSdkVersion 28
  15. defaultConfig {
  16. applicationId "com.thechiefmeat.freetusky"
  17. minSdkVersion 21
  18. targetSdkVersion 28
  19. versionCode 64
  20. versionName "8.0.2"
  21. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  22. vectorDrawables.useSupportLibrary = true
  23. kapt {
  24. arguments {
  25. arg("room.schemaLocation", "$projectDir/schemas")
  26. }
  27. }
  28. }
  29. buildTypes {
  30. release {
  31. minifyEnabled true
  32. shrinkResources true
  33. proguardFiles 'proguard-rules.pro'
  34. }
  35. debug {}
  36. }
  37. flavorDimensions "color"
  38. productFlavors {
  39. blue {}
  40. green {
  41. applicationIdSuffix ".test"
  42. versionNameSuffix "-" + getGitSha()
  43. }
  44. }
  45. lintOptions {
  46. disable 'MissingTranslation'
  47. checkReleaseBuilds false
  48. // Or, if you prefer, you can continue to check for errors in release builds,
  49. // but continue the build even when errors are found:
  50. abortOnError false
  51. }
  52. compileOptions {
  53. sourceCompatibility JavaVersion.VERSION_1_8
  54. targetCompatibility JavaVersion.VERSION_1_8
  55. }
  56. androidExtensions {
  57. experimental = true
  58. }
  59. testOptions {
  60. unitTests {
  61. includeAndroidResources = true
  62. }
  63. }
  64. sourceSets {
  65. androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
  66. }
  67. packagingOptions {
  68. // Exclude unneeded files added by libraries
  69. exclude 'LICENSE_OFL'
  70. exclude 'LICENSE_UNICODE'
  71. }
  72. bundle {
  73. language {
  74. // bundle all languages in every apk so the dynamic language switching works
  75. enableSplit = false
  76. }
  77. }
  78. }
  79. project.tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
  80. kotlinOptions {
  81. jvmTarget = "1.8"
  82. }
  83. }
  84. ext.daggerVersion = '2.23.1'
  85. ext.retrofitVersion = '2.6.0'
  86. // if libraries are changed here, they should also be changed in LicenseActivity
  87. dependencies {
  88. implementation('com.mikepenz:materialdrawer:6.1.2@aar') {
  89. transitive = true
  90. }
  91. implementation 'androidx.core:core:1.0.2'
  92. implementation 'androidx.appcompat:appcompat:1.0.2'
  93. implementation 'androidx.browser:browser:1.0.0'
  94. implementation 'androidx.recyclerview:recyclerview:1.0.0'
  95. implementation 'androidx.legacy:legacy-support-v13:1.0.0'
  96. implementation 'com.google.android.material:material:1.1.0-alpha05'
  97. implementation 'androidx.exifinterface:exifinterface:1.0.0'
  98. implementation 'androidx.cardview:cardview:1.0.0'
  99. implementation 'androidx.preference:preference:1.1.0-alpha04'
  100. implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
  101. implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
  102. implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
  103. implementation 'com.squareup.okhttp3:okhttp:3.14.2'
  104. implementation 'com.squareup.okhttp3:logging-interceptor:3.14.2'
  105. implementation 'org.conscrypt:conscrypt-android:2.1.0'
  106. implementation 'com.github.connyduck:sparkbutton:2.0.0'
  107. implementation 'com.github.chrisbanes:PhotoView:2.3.0'
  108. implementation 'com.mikepenz:google-material-typeface:3.0.1.3.original@aar'
  109. implementation('com.theartofdev.edmodo:android-image-cropper:2.8.0') {
  110. exclude group: 'com.android.support'
  111. }
  112. implementation 'com.evernote:android-job:1.2.6'
  113. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  114. // EmojiCompat
  115. implementation 'androidx.emoji:emoji:1.0.0'
  116. implementation 'androidx.emoji:emoji-appcompat:1.0.0'
  117. implementation 'de.c1710:filemojicompat:1.0.17'
  118. // architecture components
  119. implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
  120. //room
  121. implementation 'androidx.room:room-runtime:2.1.0'
  122. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  123. kapt 'androidx.room:room-compiler:2.1.0'
  124. implementation 'androidx.room:room-rxjava2:2.1.0'
  125. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
  126. implementation "com.google.dagger:dagger:$daggerVersion"
  127. kapt "com.google.dagger:dagger-compiler:$daggerVersion"
  128. implementation "com.google.dagger:dagger-android:$daggerVersion"
  129. implementation "com.google.dagger:dagger-android-support:$daggerVersion"
  130. kapt "com.google.dagger:dagger-android-processor:$daggerVersion"
  131. testImplementation 'org.robolectric:robolectric:4.3'
  132. testImplementation 'org.mockito:mockito-inline:2.28.2'
  133. testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0'
  134. androidTestImplementation('androidx.test.espresso:espresso-core:3.1.1', {
  135. exclude group: 'com.android.support', module: 'support-annotations'
  136. })
  137. androidTestImplementation 'android.arch.persistence.room:testing:1.1.1'
  138. androidTestImplementation 'androidx.test.ext:junit:1.1.1'
  139. testImplementation 'androidx.test.ext:junit:1.1.1'
  140. debugImplementation 'im.dino:dbinspector:3.4.1@aar'
  141. implementation 'io.reactivex.rxjava2:rxjava:2.2.9'
  142. implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
  143. implementation 'io.reactivex.rxjava2:rxkotlin:2.3.0'
  144. implementation 'com.uber.autodispose:autodispose-android-archcomponents:1.3.0'
  145. implementation 'com.uber.autodispose:autodispose:1.3.0'
  146. implementation 'androidx.paging:paging-runtime-ktx:2.1.0'
  147. //Glide
  148. implementation 'com.github.bumptech.glide:glide:4.9.0'
  149. implementation 'com.github.bumptech.glide:okhttp3-integration:4.9.0'
  150. implementation 'jp.wasabeef:glide-transformations:3.1.1' // intentionally use 3.x version because of 2mb smaller apk
  151. //Add some useful extensions
  152. implementation 'androidx.core:core-ktx:1.2.0-alpha01'
  153. }