build.gradle 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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 '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.keylesspalace.tusky"
  17. minSdkVersion 21
  18. targetSdkVersion 28
  19. versionCode 56
  20. versionName "5.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. }
  48. compileOptions {
  49. sourceCompatibility JavaVersion.VERSION_1_8
  50. targetCompatibility JavaVersion.VERSION_1_8
  51. }
  52. androidExtensions {
  53. experimental = true
  54. }
  55. testOptions {
  56. unitTests {
  57. includeAndroidResources = true
  58. }
  59. }
  60. sourceSets {
  61. androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
  62. }
  63. packagingOptions {
  64. // Exclude unneeded files added by libraries
  65. exclude 'LICENSE_OFL'
  66. exclude 'LICENSE_UNICODE'
  67. }
  68. }
  69. ext.daggerVersion = '2.21'
  70. // if libraries are changed here, they should also be changed in LicenseActivity
  71. dependencies {
  72. implementation('com.mikepenz:materialdrawer:6.1.1@aar') {
  73. transitive = true
  74. }
  75. implementation 'androidx.core:core:1.0.1'
  76. implementation 'androidx.appcompat:appcompat:1.0.2'
  77. implementation 'androidx.browser:browser:1.0.0'
  78. implementation 'androidx.recyclerview:recyclerview:1.0.0'
  79. implementation 'androidx.legacy:legacy-support-v13:1.0.0'
  80. implementation 'com.google.android.material:material:1.1.0-alpha04'
  81. implementation 'androidx.exifinterface:exifinterface:1.0.0'
  82. implementation 'androidx.cardview:cardview:1.0.0'
  83. implementation 'androidx.preference:preference:1.1.0-alpha03'
  84. implementation 'com.squareup.retrofit2:retrofit:2.5.0'
  85. implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
  86. implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0'
  87. implementation 'com.squareup.picasso:picasso:2.5.2'
  88. implementation 'com.squareup.okhttp3:okhttp:3.13.1'
  89. implementation 'com.squareup.okhttp3:logging-interceptor:3.13.1'
  90. implementation "org.conscrypt:conscrypt-android:2.0.0"
  91. implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'
  92. implementation 'com.github.connyduck:sparkbutton:2.0.0'
  93. implementation 'com.github.chrisbanes:PhotoView:2.3.0'
  94. implementation 'com.mikepenz:google-material-typeface:3.0.1.3.original@aar'
  95. implementation('com.theartofdev.edmodo:android-image-cropper:2.8.0') {
  96. exclude group: 'com.android.support'
  97. }
  98. implementation 'com.evernote:android-job:1.2.6'
  99. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  100. // EmojiCompat
  101. implementation 'androidx.emoji:emoji:1.0.0'
  102. implementation 'androidx.emoji:emoji-appcompat:1.0.0'
  103. implementation 'de.c1710:filemojicompat:1.0.14'
  104. // architecture components
  105. implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
  106. //room
  107. implementation 'androidx.room:room-runtime:2.0.0'
  108. kapt 'androidx.room:room-compiler:2.0.0'
  109. implementation 'androidx.room:room-rxjava2:2.0.0'
  110. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  111. implementation "com.google.dagger:dagger:$daggerVersion"
  112. kapt "com.google.dagger:dagger-compiler:$daggerVersion"
  113. implementation "com.google.dagger:dagger-android:$daggerVersion"
  114. implementation "com.google.dagger:dagger-android-support:$daggerVersion"
  115. kapt "com.google.dagger:dagger-android-processor:$daggerVersion"
  116. testImplementation 'org.robolectric:robolectric:4.2'
  117. testImplementation 'org.mockito:mockito-inline:2.24.0'
  118. testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0"
  119. androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
  120. exclude group: 'com.android.support', module: 'support-annotations'
  121. })
  122. androidTestImplementation('android.arch.persistence.room:testing:1.1.1')
  123. androidTestImplementation "androidx.test.ext:junit:1.1.0"
  124. testImplementation "androidx.test.ext:junit:1.1.0"
  125. debugImplementation 'im.dino:dbinspector:3.4.1@aar'
  126. implementation 'io.reactivex.rxjava2:rxjava:2.2.6'
  127. implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
  128. implementation 'io.reactivex.rxjava2:rxkotlin:2.3.0'
  129. implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0'
  130. implementation 'com.uber.autodispose:autodispose-android-archcomponents:1.1.0'
  131. implementation 'com.uber.autodispose:autodispose-ktx:1.1.0'
  132. implementation 'androidx.paging:paging-runtime-ktx:2.1.0'
  133. }