build.gradle 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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 61
  20. versionName "7.0"
  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. bundle {
  69. language {
  70. // bundle all languages in every apk so the dynamic language switching works
  71. enableSplit = false
  72. }
  73. }
  74. }
  75. project.tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
  76. kotlinOptions {
  77. jvmTarget = "1.8"
  78. }
  79. }
  80. ext.daggerVersion = '2.22.1'
  81. // if libraries are changed here, they should also be changed in LicenseActivity
  82. dependencies {
  83. implementation('com.mikepenz:materialdrawer:6.1.2@aar') {
  84. transitive = true
  85. }
  86. implementation 'androidx.core:core:1.0.2'
  87. implementation 'androidx.appcompat:appcompat:1.0.2'
  88. implementation 'androidx.browser:browser:1.0.0'
  89. implementation 'androidx.recyclerview:recyclerview:1.0.0'
  90. implementation 'androidx.legacy:legacy-support-v13:1.0.0'
  91. implementation 'com.google.android.material:material:1.1.0-alpha05'
  92. implementation 'androidx.exifinterface:exifinterface:1.0.0'
  93. implementation 'androidx.cardview:cardview:1.0.0'
  94. implementation 'androidx.preference:preference:1.1.0-alpha04'
  95. implementation 'com.squareup.retrofit2:retrofit:2.5.0'
  96. implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
  97. implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0'
  98. implementation 'com.squareup.okhttp3:okhttp:3.14.1'
  99. implementation 'com.squareup.okhttp3:logging-interceptor:3.14.1'
  100. implementation 'org.conscrypt:conscrypt-android:2.1.0'
  101. implementation 'com.github.connyduck:sparkbutton:2.0.0'
  102. implementation 'com.github.chrisbanes:PhotoView:2.3.0'
  103. implementation 'com.mikepenz:google-material-typeface:3.0.1.3.original@aar'
  104. implementation('com.theartofdev.edmodo:android-image-cropper:2.8.0') {
  105. exclude group: 'com.android.support'
  106. }
  107. implementation 'com.evernote:android-job:1.2.6'
  108. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  109. // EmojiCompat
  110. implementation 'androidx.emoji:emoji:1.0.0'
  111. implementation 'androidx.emoji:emoji-appcompat:1.0.0'
  112. implementation 'de.c1710:filemojicompat:1.0.14'
  113. // architecture components
  114. implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
  115. //room
  116. implementation 'androidx.room:room-runtime:2.0.0'
  117. kapt 'androidx.room:room-compiler:2.0.0'
  118. implementation 'androidx.room:room-rxjava2:2.0.0'
  119. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  120. implementation "com.google.dagger:dagger:$daggerVersion"
  121. kapt "com.google.dagger:dagger-compiler:$daggerVersion"
  122. implementation "com.google.dagger:dagger-android:$daggerVersion"
  123. implementation "com.google.dagger:dagger-android-support:$daggerVersion"
  124. kapt "com.google.dagger:dagger-android-processor:$daggerVersion"
  125. testImplementation 'org.robolectric:robolectric:4.2.1'
  126. testImplementation 'org.mockito:mockito-inline:2.27.0'
  127. testImplementation 'com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0'
  128. androidTestImplementation('androidx.test.espresso:espresso-core:3.1.1', {
  129. exclude group: 'com.android.support', module: 'support-annotations'
  130. })
  131. androidTestImplementation 'android.arch.persistence.room:testing:1.1.1'
  132. androidTestImplementation 'androidx.test.ext:junit:1.1.0'
  133. testImplementation 'androidx.test.ext:junit:1.1.0'
  134. debugImplementation 'im.dino:dbinspector:3.4.1@aar'
  135. implementation 'io.reactivex.rxjava2:rxjava:2.2.8'
  136. implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
  137. implementation 'io.reactivex.rxjava2:rxkotlin:2.3.0'
  138. implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0'
  139. implementation 'com.uber.autodispose:autodispose-android-archcomponents:1.3.0'
  140. implementation 'com.uber.autodispose:autodispose:1.3.0'
  141. implementation 'androidx.paging:paging-runtime-ktx:2.1.0'
  142. //Glide
  143. implementation 'com.github.bumptech.glide:glide:4.9.0'
  144. implementation 'com.github.bumptech.glide:okhttp3-integration:4.9.0'
  145. }