Permalink
Browse files

Migrate to Kotlin

  • Loading branch information...
TonnyL committed May 25, 2018
1 parent d25b65a commit 45476a3ce62190e65cedceea4d4ae188f6b87e84
Showing with 9,042 additions and 10,713 deletions.
  1. +21 βˆ’8 .travis.yml
  2. +36 βˆ’30 app/build.gradle
  3. +1,171 βˆ’0 app/schemas/com.marktony.zhihudaily.database.AppDatabase/1.json
  4. +0 βˆ’29 app/src/androidTest/java/com/marktony/zhihudaily/ApplicationTest.java
  5. +19 βˆ’0 app/src/androidTest/java/com/marktony/zhihudaily/UtilInstrumentedTest.kt
  6. +3 βˆ’3 app/src/main/java/com/marktony/zhihudaily/{BasePresenter.java β†’ BasePresenter.kt}
  7. +3 βˆ’7 app/src/main/java/com/marktony/zhihudaily/{BaseView.java β†’ BaseView.kt}
  8. +10 βˆ’13 app/src/main/java/com/marktony/zhihudaily/{PaperPlaneApp.java β†’ PaperPlaneApp.kt}
  9. +0 βˆ’58 app/src/main/java/com/marktony/zhihudaily/customtabs/CustomTabsHelper.java
  10. +59 βˆ’0 app/src/main/java/com/marktony/zhihudaily/customtabs/CustomTabsHelper.kt
  11. +2 βˆ’2 app/src/main/java/com/marktony/zhihudaily/data/{ContentType.java β†’ ContentType.kt}
  12. +0 βˆ’302 app/src/main/java/com/marktony/zhihudaily/data/DoubanMomentContent.java
  13. +144 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/DoubanMomentContent.kt
  14. +0 βˆ’93 app/src/main/java/com/marktony/zhihudaily/data/DoubanMomentNews.java
  15. +56 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/DoubanMomentNews.kt
  16. +0 βˆ’177 app/src/main/java/com/marktony/zhihudaily/data/DoubanMomentNewsAuthor.java
  17. +92 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/DoubanMomentNewsAuthor.kt
  18. +0 βˆ’74 app/src/main/java/com/marktony/zhihudaily/data/DoubanMomentNewsLarge.java
  19. +51 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/DoubanMomentNewsLarge.kt
  20. +0 βˆ’74 app/src/main/java/com/marktony/zhihudaily/data/DoubanMomentNewsMedium.java
  21. +51 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/DoubanMomentNewsMedium.kt
  22. +0 βˆ’320 app/src/main/java/com/marktony/zhihudaily/data/DoubanMomentNewsPosts.java
  23. +143 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/DoubanMomentNewsPosts.kt
  24. +0 βˆ’74 app/src/main/java/com/marktony/zhihudaily/data/DoubanMomentNewsSmall.java
  25. +51 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/DoubanMomentNewsSmall.kt
  26. +0 βˆ’113 app/src/main/java/com/marktony/zhihudaily/data/DoubanMomentNewsThumbs.java
  27. +67 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/DoubanMomentNewsThumbs.kt
  28. +0 βˆ’70 app/src/main/java/com/marktony/zhihudaily/data/GuokrHandpickContent.java
  29. +51 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/GuokrHandpickContent.kt
  30. +0 βˆ’96 app/src/main/java/com/marktony/zhihudaily/data/GuokrHandpickContentChannel.java
  31. +61 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/GuokrHandpickContentChannel.kt
  32. +0 βˆ’70 app/src/main/java/com/marktony/zhihudaily/data/GuokrHandpickContentImageInfo.java
  33. +51 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/GuokrHandpickContentImageInfo.kt
  34. +0 βˆ’109 app/src/main/java/com/marktony/zhihudaily/data/GuokrHandpickContentMinisite.java
  35. +66 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/GuokrHandpickContentMinisite.kt
  36. +0 βˆ’433 app/src/main/java/com/marktony/zhihudaily/data/GuokrHandpickContentResult.java
  37. +191 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/GuokrHandpickContentResult.kt
  38. +0 βˆ’105 app/src/main/java/com/marktony/zhihudaily/data/GuokrHandpickNews.java
  39. +60 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/GuokrHandpickNews.kt
  40. +0 βˆ’192 app/src/main/java/com/marktony/zhihudaily/data/GuokrHandpickNewsAuthor.java
  41. +97 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/GuokrHandpickNewsAuthor.kt
  42. +0 βˆ’72 app/src/main/java/com/marktony/zhihudaily/data/GuokrHandpickNewsAvatar.java
  43. +51 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/GuokrHandpickNewsAvatar.kt
  44. +0 βˆ’458 app/src/main/java/com/marktony/zhihudaily/data/GuokrHandpickNewsResult.java
  45. +199 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/GuokrHandpickNewsResult.kt
  46. +0 βˆ’40 app/src/main/java/com/marktony/zhihudaily/data/PostType.java
  47. +31 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/PostType.kt
  48. +0 βˆ’186 app/src/main/java/com/marktony/zhihudaily/data/ZhihuDailyContent.java
  49. +91 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/ZhihuDailyContent.kt
  50. +0 βˆ’57 app/src/main/java/com/marktony/zhihudaily/data/ZhihuDailyNews.java
  51. +44 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/ZhihuDailyNews.kt
  52. +0 βˆ’129 app/src/main/java/com/marktony/zhihudaily/data/ZhihuDailyNewsQuestion.java
  53. +76 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/ZhihuDailyNewsQuestion.kt
  54. +8 βˆ’10 ...ly/data/source/datasource/{DoubanMomentContentDataSource.java β†’ DoubanMomentContentDataSource.kt}
  55. +0 βˆ’59 app/src/main/java/com/marktony/zhihudaily/data/source/datasource/DoubanMomentNewsDataSource.java
  56. +55 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/datasource/DoubanMomentNewsDataSource.kt
  57. +8 βˆ’10 .../data/source/datasource/{GuokrHandpickContentDataSource.java β†’ GuokrHandpickContentDataSource.kt}
  58. +0 βˆ’59 app/src/main/java/com/marktony/zhihudaily/data/source/datasource/GuokrHandpickDataSource.java
  59. +55 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/datasource/GuokrHandpickDataSource.kt
  60. +8 βˆ’10 ...udaily/data/source/datasource/{ZhihuDailyContentDataSource.java β†’ ZhihuDailyContentDataSource.kt}
  61. +0 βˆ’59 app/src/main/java/com/marktony/zhihudaily/data/source/datasource/ZhihuDailyNewsDataSource.java
  62. +55 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/datasource/ZhihuDailyNewsDataSource.kt
  63. +0 βˆ’98 app/src/main/java/com/marktony/zhihudaily/data/source/local/DoubanMomentContentLocalDataSource.java
  64. +80 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/local/DoubanMomentContentLocalDataSource.kt
  65. +0 βˆ’175 app/src/main/java/com/marktony/zhihudaily/data/source/local/DoubanMomentNewsLocalDataSource.java
  66. +126 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/local/DoubanMomentNewsLocalDataSource.kt
  67. +0 βˆ’102 app/src/main/java/com/marktony/zhihudaily/data/source/local/GuokrHandpickContentLocalDataSource.java
  68. +84 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/local/GuokrHandpickContentLocalDataSource.kt
  69. +0 βˆ’177 app/src/main/java/com/marktony/zhihudaily/data/source/local/GuokrHandpickNewsLocalDataSource.java
  70. +123 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/local/GuokrHandpickNewsLocalDataSource.kt
  71. +0 βˆ’104 app/src/main/java/com/marktony/zhihudaily/data/source/local/ZhihuDailyContentLocalDataSource.java
  72. +78 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/local/ZhihuDailyContentLocalDataSource.kt
  73. +0 βˆ’179 app/src/main/java/com/marktony/zhihudaily/data/source/local/ZhihuDailyNewsLocalDataSource.java
  74. +128 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/local/ZhihuDailyNewsLocalDataSource.kt
  75. +0 βˆ’82 ...src/main/java/com/marktony/zhihudaily/data/source/remote/DoubanMomentContentRemoteDataSource.java
  76. +75 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/remote/DoubanMomentContentRemoteDataSource.kt
  77. +0 βˆ’104 app/src/main/java/com/marktony/zhihudaily/data/source/remote/DoubanMomentNewsRemoteDataSource.java
  78. +91 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/remote/DoubanMomentNewsRemoteDataSource.kt
  79. +0 βˆ’87 ...rc/main/java/com/marktony/zhihudaily/data/source/remote/GuokrHandpickContentRemoteDataSource.java
  80. +81 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/remote/GuokrHandpickContentRemoteDataSource.kt
  81. +0 βˆ’103 app/src/main/java/com/marktony/zhihudaily/data/source/remote/GuokrHandpickNewsRemoteDataSource.java
  82. +91 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/remote/GuokrHandpickNewsRemoteDataSource.kt
  83. +0 βˆ’81 app/src/main/java/com/marktony/zhihudaily/data/source/remote/ZhihuDailyContentRemoteDataSource.java
  84. +74 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/remote/ZhihuDailyContentRemoteDataSource.kt
  85. +0 βˆ’119 app/src/main/java/com/marktony/zhihudaily/data/source/remote/ZhihuDailyNewsRemoteDataSource.java
  86. +107 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/remote/ZhihuDailyNewsRemoteDataSource.kt
  87. +0 βˆ’111 app/src/main/java/com/marktony/zhihudaily/data/source/repository/DoubanMomentContentRepository.java
  88. +95 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/repository/DoubanMomentContentRepository.kt
  89. +0 βˆ’209 app/src/main/java/com/marktony/zhihudaily/data/source/repository/DoubanMomentNewsRepository.java
  90. +166 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/repository/DoubanMomentNewsRepository.kt
  91. +0 βˆ’110 app/src/main/java/com/marktony/zhihudaily/data/source/repository/GuokrHandpickContentRepository.java
  92. +93 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/repository/GuokrHandpickContentRepository.kt
  93. +0 βˆ’208 app/src/main/java/com/marktony/zhihudaily/data/source/repository/GuokrHandpickNewsRepository.java
  94. +165 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/repository/GuokrHandpickNewsRepository.kt
  95. +0 βˆ’110 app/src/main/java/com/marktony/zhihudaily/data/source/repository/ZhihuDailyContentRepository.java
  96. +94 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/repository/ZhihuDailyContentRepository.kt
  97. +0 βˆ’208 app/src/main/java/com/marktony/zhihudaily/data/source/repository/ZhihuDailyNewsRepository.java
  98. +167 βˆ’0 app/src/main/java/com/marktony/zhihudaily/data/source/repository/ZhihuDailyNewsRepository.kt
  99. +0 βˆ’66 app/src/main/java/com/marktony/zhihudaily/database/AppDatabase.java
  100. +74 βˆ’0 app/src/main/java/com/marktony/zhihudaily/database/AppDatabase.kt
  101. +0 βˆ’97 app/src/main/java/com/marktony/zhihudaily/database/DatabaseCreator.java
  102. +0 βˆ’49 app/src/main/java/com/marktony/zhihudaily/database/converter/DoubanTypeConverters.java
  103. +49 βˆ’0 app/src/main/java/com/marktony/zhihudaily/database/converter/DoubanTypeConverters.kt
  104. +0 βˆ’61 app/src/main/java/com/marktony/zhihudaily/database/converter/GuokrContentTypeConverters.java
  105. +61 βˆ’0 app/src/main/java/com/marktony/zhihudaily/database/converter/GuokrContentTypeConverters.kt
  106. +0 βˆ’73 app/src/main/java/com/marktony/zhihudaily/database/converter/GuokrResultTypeConverter.java
  107. +75 βˆ’0 app/src/main/java/com/marktony/zhihudaily/database/converter/GuokrResultTypeConverter.kt
  108. +0 βˆ’47 app/src/main/java/com/marktony/zhihudaily/database/converter/StringTypeConverter.java
  109. +47 βˆ’0 app/src/main/java/com/marktony/zhihudaily/database/converter/StringTypeConverter.kt
  110. +9 βˆ’15 ...va/com/marktony/zhihudaily/database/dao/{DoubanMomentContentDao.java β†’ DoubanMomentContentDao.kt}
  111. +12 βˆ’20 ...ain/java/com/marktony/zhihudaily/database/dao/{DoubanMomentNewsDao.java β†’ DoubanMomentNewsDao.kt}
  112. +9 βˆ’15 .../com/marktony/zhihudaily/database/dao/{GuokrHandpickContentDao.java β†’ GuokrHandpickContentDao.kt}
  113. +12 βˆ’20 ...n/java/com/marktony/zhihudaily/database/dao/{GuokrHandpickNewsDao.java β†’ GuokrHandpickNewsDao.kt}
  114. +9 βˆ’15 ...n/java/com/marktony/zhihudaily/database/dao/{ZhihuDailyContentDao.java β†’ ZhihuDailyContentDao.kt}
  115. +12 βˆ’20 ...rc/main/java/com/marktony/zhihudaily/database/dao/{ZhihuDailyNewsDao.java β†’ ZhihuDailyNewsDao.kt}
  116. +0 βˆ’114 app/src/main/java/com/marktony/zhihudaily/details/DetailsActivity.java
  117. +93 βˆ’0 app/src/main/java/com/marktony/zhihudaily/details/DetailsActivity.kt
  118. +0 βˆ’75 app/src/main/java/com/marktony/zhihudaily/details/DetailsContract.java
  119. +66 βˆ’0 app/src/main/java/com/marktony/zhihudaily/details/DetailsContract.kt
  120. +0 βˆ’408 app/src/main/java/com/marktony/zhihudaily/details/DetailsFragment.java
  121. +328 βˆ’0 app/src/main/java/com/marktony/zhihudaily/details/DetailsFragment.kt
  122. +0 βˆ’250 app/src/main/java/com/marktony/zhihudaily/details/DetailsPresenter.java
  123. +211 βˆ’0 app/src/main/java/com/marktony/zhihudaily/details/DetailsPresenter.kt
  124. +0 βˆ’431 app/src/main/java/com/marktony/zhihudaily/favorites/FavoritesAdapter.java
  125. +292 βˆ’0 app/src/main/java/com/marktony/zhihudaily/favorites/FavoritesAdapter.kt
  126. +0 βˆ’53 app/src/main/java/com/marktony/zhihudaily/favorites/FavoritesContract.java
  127. +51 βˆ’0 app/src/main/java/com/marktony/zhihudaily/favorites/FavoritesContract.kt
  128. +0 βˆ’161 app/src/main/java/com/marktony/zhihudaily/favorites/FavoritesFragment.java
  129. +142 βˆ’0 app/src/main/java/com/marktony/zhihudaily/favorites/FavoritesFragment.kt
  130. +0 βˆ’109 app/src/main/java/com/marktony/zhihudaily/favorites/FavoritesPresenter.java
  131. +83 βˆ’0 app/src/main/java/com/marktony/zhihudaily/favorites/FavoritesPresenter.kt
  132. +30 βˆ’0 app/src/main/java/com/marktony/zhihudaily/glide/ImageViewExtensions.kt
  133. +62 βˆ’0 app/src/main/java/com/marktony/zhihudaily/glide/PaperPlaneAppGlideModule.kt
  134. +5 βˆ’5 ...hudaily/interfaze/{OnRecyclerViewItemOnClickListener.java β†’ OnRecyclerViewItemOnClickListener.kt}
  135. +0 βˆ’75 app/src/main/java/com/marktony/zhihudaily/retrofit/RetrofitService.java
  136. +73 βˆ’0 app/src/main/java/com/marktony/zhihudaily/retrofit/RetrofitService.kt
  137. +0 βˆ’329 app/src/main/java/com/marktony/zhihudaily/service/CacheService.java
  138. +259 βˆ’0 app/src/main/java/com/marktony/zhihudaily/service/CacheService.kt
  139. +11 βˆ’15 .../main/java/com/marktony/zhihudaily/timeline/{DoubanMomentContract.java β†’ DoubanMomentContract.kt}
  140. +0 βˆ’223 app/src/main/java/com/marktony/zhihudaily/timeline/DoubanMomentFragment.java
  141. +194 βˆ’0 app/src/main/java/com/marktony/zhihudaily/timeline/DoubanMomentFragment.kt
  142. +0 βˆ’165 app/src/main/java/com/marktony/zhihudaily/timeline/DoubanMomentNewsAdapter.java
  143. +107 βˆ’0 app/src/main/java/com/marktony/zhihudaily/timeline/DoubanMomentNewsAdapter.kt
  144. +0 βˆ’75 app/src/main/java/com/marktony/zhihudaily/timeline/DoubanMomentPresenter.java
  145. +61 βˆ’0 app/src/main/java/com/marktony/zhihudaily/timeline/DoubanMomentPresenter.kt
  146. +11 βˆ’15 ...ain/java/com/marktony/zhihudaily/timeline/{GuokrHandpickContract.java β†’ GuokrHandpickContract.kt}
  147. +0 βˆ’178 app/src/main/java/com/marktony/zhihudaily/timeline/GuokrHandpickFragment.java
  148. +146 βˆ’0 app/src/main/java/com/marktony/zhihudaily/timeline/GuokrHandpickFragment.kt
  149. +0 βˆ’121 app/src/main/java/com/marktony/zhihudaily/timeline/GuokrHandpickNewsAdapter.java
  150. +77 βˆ’0 app/src/main/java/com/marktony/zhihudaily/timeline/GuokrHandpickNewsAdapter.kt
  151. +0 βˆ’74 app/src/main/java/com/marktony/zhihudaily/timeline/GuokrHandpickPresenter.java
  152. +61 βˆ’0 app/src/main/java/com/marktony/zhihudaily/timeline/GuokrHandpickPresenter.kt
  153. +0 βˆ’161 app/src/main/java/com/marktony/zhihudaily/timeline/TimelineFragment.java
  154. +117 βˆ’0 app/src/main/java/com/marktony/zhihudaily/timeline/TimelineFragment.kt
  155. +0 βˆ’78 app/src/main/java/com/marktony/zhihudaily/timeline/TimelineFragmentPagerAdapter.java
  156. +57 βˆ’0 app/src/main/java/com/marktony/zhihudaily/timeline/TimelineFragmentPagerAdapter.kt
  157. +11 βˆ’15 app/src/main/java/com/marktony/zhihudaily/timeline/{ZhihuDailyContract.java β†’ ZhihuDailyContract.kt}
  158. +0 βˆ’229 app/src/main/java/com/marktony/zhihudaily/timeline/ZhihuDailyFragment.java
  159. +198 βˆ’0 app/src/main/java/com/marktony/zhihudaily/timeline/ZhihuDailyFragment.kt
  160. +0 βˆ’122 app/src/main/java/com/marktony/zhihudaily/timeline/ZhihuDailyNewsAdapter.java
  161. +78 βˆ’0 app/src/main/java/com/marktony/zhihudaily/timeline/ZhihuDailyNewsAdapter.kt
  162. +0 βˆ’75 app/src/main/java/com/marktony/zhihudaily/timeline/ZhihuDailyPresenter.java
  163. +61 βˆ’0 app/src/main/java/com/marktony/zhihudaily/timeline/ZhihuDailyPresenter.kt
  164. +0 βˆ’55 app/src/main/java/com/marktony/zhihudaily/ui/InfoFragment.java
  165. +53 βˆ’0 app/src/main/java/com/marktony/zhihudaily/ui/InfoFragment.kt
  166. +0 βˆ’176 app/src/main/java/com/marktony/zhihudaily/ui/InfoPreferenceFragment.java
  167. +169 βˆ’0 app/src/main/java/com/marktony/zhihudaily/ui/InfoPreferenceFragment.kt
  168. +0 βˆ’58 app/src/main/java/com/marktony/zhihudaily/ui/LicenseActivity.java
  169. +51 βˆ’0 app/src/main/java/com/marktony/zhihudaily/ui/LicenseActivity.kt
  170. +0 βˆ’202 app/src/main/java/com/marktony/zhihudaily/ui/MainActivity.java
  171. +161 βˆ’0 app/src/main/java/com/marktony/zhihudaily/ui/MainActivity.kt
  172. +0 βˆ’83 app/src/main/java/com/marktony/zhihudaily/util/DateFormatUtil.java
  173. +79 βˆ’0 app/src/main/java/com/marktony/zhihudaily/util/DateFormatUtil.kt
  174. +0 βˆ’36 app/src/main/java/com/marktony/zhihudaily/util/InfoConstants.java
  175. +28 βˆ’0 app/src/main/java/com/marktony/zhihudaily/util/InfoConstants.kt
  176. +13 βˆ’15 app/src/main/res/layout/fragment_details.xml
  177. +22 βˆ’24 app/src/main/res/layout/fragment_timeline_page.xml
  178. +19 βˆ’17 app/src/main/res/layout/item_universal_layout.xml
  179. +9 βˆ’11 app/src/main/res/layout/item_universal_without_image.xml
  180. +9 βˆ’7 app/src/test/java/com/marktony/zhihudaily/{ExampleUnitTest.java β†’ ExampleUnitTest.kt}
  181. +19 βˆ’6 build.gradle
  182. +1 βˆ’1 gradle/wrapper/gradle-wrapper.properties
@@ -4,33 +4,46 @@ sudo: false

env:
global:
- ANDROID_API_LEVEL=26
- ANDROID_BUILD_TOOLS_VERSION=26.0.0
- ANDROID_API_LEVEL=27
- ANDROID_BUILD_TOOLS_VERSION=27.0.3
- ANDROID_TAG=google_apis

android:
components:
- tools
- platform-tools # latest
- tools # to install the latest android sdk tools

- platform-tools
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
- extra
- android-$ANDROID_API_LEVEL
- extra-google-m2repository
- extra-android-m2repository

licenses:
- android-sdk-license-.+
- '.+'

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/

cache:
#Cache all dirs under .gradle folder
directories:
# Cache daemon logs
- $HOME/.gradle/daemon
# Cache library downloaded from the gradle dependency
- $HOME/.gradle/native
# Cache the gradle
- $HOME/.gradle/wrapper

before_install:
- chmod +x gradlew
- mkdir "$ANDROID_HOME/licenses" || true
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
# A solution to avoid failure when using android 27, build-tools-27.0.2
- yes | sdkmanager "platforms;android-27"

notifications:
email: false

script:
- ./gradlew assembleRelease
- ./gradlew assembleRelease
@@ -1,17 +1,20 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

android {

compileSdkVersion 26
buildToolsVersion '26.0.0'
compileSdkVersion 27

defaultConfig {
applicationId "com.marktony.zhihudaily"
minSdkVersion 21
targetSdkVersion 26
versionCode 19
targetSdkVersion 27
versionCode 20
versionName "V3.3.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
@@ -34,42 +37,45 @@ android {
lintOptions {
abortOnError false
}

kapt {
correctErrorTypes = true
}
}

ext {
supportLibVersion = '26.0.0-beta2'
gsonVersion = '2.8.0'
datetimePickerVersion = '3.1.3'
glideVersion = '3.7.0'
archRoomVersion = '1.0.0-alpha3'
retrofitVersion = '2.2.0'
androidExtensions {
experimental = true
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
implementation fileTree(include: ['*.jar'], dir: 'libs')

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}"

// Support series
compile "com.android.support:appcompat-v7:${supportLibVersion}"
compile "com.android.support:design:${supportLibVersion}"
compile "com.android.support:preference-v14:${supportLibVersion}"
compile "com.android.support:customtabs:${supportLibVersion}"
implementation "com.android.support:appcompat-v7:${versions.support_library}"
implementation "com.android.support:design:${versions.support_library}"
implementation "com.android.support:preference-v14:${versions.support_library}"
implementation "com.android.support:customtabs:${versions.support_library}"

// Room
compile "android.arch.persistence.room:runtime:${archRoomVersion}"
annotationProcessor "android.arch.persistence.room:compiler:${archRoomVersion}"
implementation "android.arch.persistence.room:runtime:${versions.arch_room}"
kapt "android.arch.persistence.room:compiler:${versions.arch_room}"

// Retrofit series
compile "com.squareup.retrofit2:retrofit:${retrofitVersion}"
compile "com.squareup.retrofit2:converter-gson:${retrofitVersion}"
implementation "com.squareup.retrofit2:retrofit:${versions.retrofit}"
implementation "com.squareup.retrofit2:converter-gson:${versions.retrofit}"
implementation "com.squareup.okhttp3:logging-interceptor:${versions.okhttp_logging_interceptor}"

// Glide
compile "com.github.bumptech.glide:glide:${glideVersion}"
implementation "com.github.bumptech.glide:glide:${versions.glide}"
kapt "com.github.bumptech.glide:compiler:${versions.glide}"
implementation "com.github.bumptech.glide:okhttp3-integration:${versions.glide}"

// Material date time picker
compile ("com.wdullaer:materialdatetimepicker:${datetimePickerVersion}") {
implementation("com.wdullaer:materialdatetimepicker:${versions.date_time_picker}") {
exclude group: 'com.android.support'
}

// Junit
testCompile 'junit:junit:4.12'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${versions.coroutines}"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${versions.coroutines}"

testImplementation "junit:junit:${versions.junit}"
androidTestImplementation "com.android.support.test:runner:${versions.test_runner}"
androidTestImplementation "com.android.support.test.espresso:espresso-core:${versions.espresso_core}"
}
Oops, something went wrong.

0 comments on commit 45476a3

Please sign in to comment.