build.gradle 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. import java.text.SimpleDateFormat
  2. apply plugin: 'android-sdk-manager'
  3. apply plugin: 'com.android.application'
  4. apply plugin: 'com.neenbedankt.android-apt'
  5. apply plugin: 'me.tatarka.retrolambda'
  6. retrolambda {
  7. jvmArgs '-noverify'
  8. }
  9. ext {
  10. // Git is needed in your system PATH for these commands to work.
  11. // If it's not installed, you can return a random value as a workaround
  12. getCommitCount = {
  13. return 'git rev-list --count origin/master'.execute().text.trim()
  14. // return "1"
  15. }
  16. getGitSha = {
  17. return 'git rev-parse --short HEAD'.execute().text.trim()
  18. // return "1"
  19. }
  20. getBuildTime = {
  21. def df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'")
  22. df.setTimeZone(TimeZone.getTimeZone("UTC"))
  23. return df.format(new Date())
  24. }
  25. }
  26. android {
  27. compileSdkVersion 23
  28. buildToolsVersion "23.0.2"
  29. publishNonDefault true
  30. defaultConfig {
  31. applicationId "eu.kanade.tachiyomi"
  32. minSdkVersion 16
  33. targetSdkVersion 23
  34. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  35. versionCode 4
  36. versionName "0.1.3"
  37. buildConfigField "String", "COMMIT_COUNT", "\"${getCommitCount()}\""
  38. buildConfigField "String", "COMMIT_SHA", "\"${getGitSha()}\""
  39. buildConfigField "String", "BUILD_TIME", "\"${getBuildTime()}\""
  40. }
  41. compileOptions {
  42. sourceCompatibility JavaVersion.VERSION_1_8
  43. targetCompatibility JavaVersion.VERSION_1_8
  44. }
  45. buildTypes {
  46. debug {
  47. applicationIdSuffix ".debug"
  48. }
  49. release {
  50. minifyEnabled true
  51. shrinkResources true
  52. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  53. }
  54. }
  55. packagingOptions {
  56. exclude 'META-INF/DEPENDENCIES'
  57. exclude 'LICENSE.txt'
  58. exclude 'META-INF/LICENSE'
  59. exclude 'META-INF/LICENSE.txt'
  60. exclude 'META-INF/NOTICE'
  61. }
  62. lintOptions {
  63. abortOnError false
  64. checkReleaseBuilds false
  65. }
  66. }
  67. dependencies {
  68. final SUPPORT_LIBRARY_VERSION = '23.1.1'
  69. final DAGGER_VERSION = '2.0.2'
  70. final OKHTTP_VERSION = '3.0.1'
  71. final MOCKITO_VERSION = '1.10.19'
  72. final STORIO_VERSION = '1.8.0'
  73. final ICEPICK_VERSION = '3.1.0'
  74. compile fileTree(dir: 'libs', include: ['*.jar'])
  75. compile project(":SubsamplingScaleImageView")
  76. compile "com.android.support:support-v4:$SUPPORT_LIBRARY_VERSION"
  77. compile "com.android.support:appcompat-v7:$SUPPORT_LIBRARY_VERSION"
  78. compile "com.android.support:cardview-v7:$SUPPORT_LIBRARY_VERSION"
  79. compile "com.android.support:design:$SUPPORT_LIBRARY_VERSION"
  80. compile "com.android.support:recyclerview-v7:$SUPPORT_LIBRARY_VERSION"
  81. compile "com.android.support:support-annotations:$SUPPORT_LIBRARY_VERSION"
  82. compile "com.android.support:percent:$SUPPORT_LIBRARY_VERSION"
  83. compile "com.squareup.okhttp3:okhttp:$OKHTTP_VERSION"
  84. compile "com.squareup.okhttp3:okhttp-urlconnection:$OKHTTP_VERSION"
  85. compile 'com.squareup.okio:okio:1.6.0'
  86. compile 'com.google.code.gson:gson:2.5'
  87. compile 'com.jakewharton:disklrucache:2.0.2'
  88. compile 'org.jsoup:jsoup:1.8.3'
  89. compile 'io.reactivex:rxandroid:1.1.0'
  90. compile 'io.reactivex:rxjava:1.1.0'
  91. compile 'com.f2prateek.rx.preferences:rx-preferences:1.0.1'
  92. compile "com.pushtorefresh.storio:sqlite:$STORIO_VERSION"
  93. compile "com.pushtorefresh.storio:sqlite-annotations:$STORIO_VERSION"
  94. compile 'info.android15.nucleus:nucleus:2.0.4'
  95. compile 'de.greenrobot:eventbus:2.4.0'
  96. compile 'com.github.bumptech.glide:glide:3.6.1'
  97. compile 'com.jakewharton:butterknife:7.0.1'
  98. compile 'com.jakewharton.timber:timber:4.1.0'
  99. compile 'uk.co.ribot:easyadapter:1.5.0@aar'
  100. compile 'ch.acra:acra:4.7.0'
  101. compile "frankiesardo:icepick:$ICEPICK_VERSION"
  102. provided "frankiesardo:icepick-processor:$ICEPICK_VERSION"
  103. compile 'com.github.dmytrodanylyk.android-process-button:library:1.0.4'
  104. compile 'eu.davidea:flexible-adapter:4.2.0'
  105. compile 'com.nononsenseapps:filepicker:2.5.1'
  106. compile 'com.github.amulyakhare:TextDrawable:558677e'
  107. compile 'com.github.pwittchen:reactivenetwork:0.1.5'
  108. compile "com.google.dagger:dagger:$DAGGER_VERSION"
  109. apt "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
  110. apt "com.pushtorefresh.storio:sqlite-annotations-processor:$STORIO_VERSION"
  111. provided 'org.glassfish:javax.annotation:10.0-b28'
  112. compile('com.mikepenz:materialdrawer:4.6.4@aar') {
  113. transitive = true
  114. }
  115. //Google material icons SVG.
  116. compile 'com.mikepenz:google-material-typeface:2.1.0.1.original@aar'
  117. compile('com.github.afollestad.material-dialogs:core:0.8.5.3@aar') {
  118. transitive = true
  119. }
  120. testCompile 'junit:junit:4.12'
  121. testCompile 'org.assertj:assertj-core:2.3.0'
  122. testCompile "org.mockito:mockito-core:$MOCKITO_VERSION"
  123. testCompile('org.robolectric:robolectric:3.0') {
  124. exclude group: 'commons-logging', module: 'commons-logging'
  125. exclude group: 'org.apache.httpcomponents', module: 'httpclient'
  126. }
  127. androidTestApt "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
  128. }