build.gradle 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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 1
  36. versionName "0.1.0"
  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. release {
  47. minifyEnabled true
  48. shrinkResources true
  49. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  50. }
  51. }
  52. packagingOptions {
  53. exclude 'META-INF/DEPENDENCIES'
  54. exclude 'LICENSE.txt'
  55. exclude 'META-INF/LICENSE'
  56. exclude 'META-INF/LICENSE.txt'
  57. exclude 'META-INF/NOTICE'
  58. }
  59. lintOptions {
  60. abortOnError false
  61. }
  62. }
  63. dependencies {
  64. final SUPPORT_LIBRARY_VERSION = '23.1.1'
  65. final DAGGER_VERSION = '2.0.2'
  66. final MOCKITO_VERSION = '1.10.19'
  67. final STORIO_VERSION = '1.7.0'
  68. final ICEPICK_VERSION = '3.1.0'
  69. compile fileTree(dir: 'libs', include: ['*.jar'])
  70. compile project(":SubsamplingScaleImageView")
  71. compile "com.android.support:support-v4:$SUPPORT_LIBRARY_VERSION"
  72. compile "com.android.support:appcompat-v7:$SUPPORT_LIBRARY_VERSION"
  73. compile "com.android.support:cardview-v7:$SUPPORT_LIBRARY_VERSION"
  74. compile "com.android.support:design:$SUPPORT_LIBRARY_VERSION"
  75. compile "com.android.support:recyclerview-v7:$SUPPORT_LIBRARY_VERSION"
  76. compile "com.android.support:support-annotations:$SUPPORT_LIBRARY_VERSION"
  77. compile 'com.squareup.okhttp:okhttp-urlconnection:2.7.2'
  78. compile 'com.squareup.okhttp:okhttp:2.7.2'
  79. compile 'com.squareup.okio:okio:1.6.0'
  80. compile 'com.google.code.gson:gson:2.5'
  81. compile 'com.jakewharton:disklrucache:2.0.2'
  82. compile 'org.jsoup:jsoup:1.8.3'
  83. compile 'io.reactivex:rxandroid:1.1.0'
  84. compile 'io.reactivex:rxjava:1.1.0'
  85. compile 'com.f2prateek.rx.preferences:rx-preferences:1.0.1'
  86. compile "com.pushtorefresh.storio:sqlite:$STORIO_VERSION"
  87. compile "com.pushtorefresh.storio:sqlite-annotations:$STORIO_VERSION"
  88. compile 'info.android15.nucleus:nucleus:2.0.4'
  89. compile 'de.greenrobot:eventbus:2.4.0'
  90. compile 'com.github.bumptech.glide:glide:3.6.1'
  91. compile 'com.jakewharton:butterknife:7.0.1'
  92. compile 'com.jakewharton.timber:timber:4.1.0'
  93. compile 'uk.co.ribot:easyadapter:1.5.0@aar'
  94. compile 'ch.acra:acra:4.7.0'
  95. compile "frankiesardo:icepick:$ICEPICK_VERSION"
  96. provided "frankiesardo:icepick-processor:$ICEPICK_VERSION"
  97. compile 'com.github.dmytrodanylyk.android-process-button:library:1.0.4'
  98. compile 'eu.davidea:flexible-adapter:4.2.0@aar'
  99. compile 'com.nononsenseapps:filepicker:2.5.0'
  100. compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
  101. compile 'com.github.pwittchen:reactivenetwork:0.1.5'
  102. compile "com.google.dagger:dagger:$DAGGER_VERSION"
  103. apt "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
  104. apt "com.pushtorefresh.storio:sqlite-annotations-processor:$STORIO_VERSION"
  105. provided 'org.glassfish:javax.annotation:10.0-b28'
  106. compile('com.mikepenz:materialdrawer:4.6.1@aar') {
  107. transitive = true
  108. }
  109. compile('com.github.afollestad.material-dialogs:core:0.8.5.3@aar') {
  110. transitive = true
  111. }
  112. testCompile 'junit:junit:4.12'
  113. testCompile 'org.assertj:assertj-core:2.3.0'
  114. testCompile "org.mockito:mockito-core:$MOCKITO_VERSION"
  115. testCompile('org.robolectric:robolectric:3.0') {
  116. exclude group: 'commons-logging', module: 'commons-logging'
  117. exclude group: 'org.apache.httpcomponents', module: 'httpclient'
  118. }
  119. androidTestApt "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
  120. }