build.gradle 5.4 KB

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