Commit graph

24 commits

Author SHA1 Message Date
ychescale9
ba3bf9fd2e Misc improvements and cleanups (#47)
* Add kotlin plugin to cache module

* Remove custom accessors in StoreDefaults as default values are effectively constant.

* Update JUnit to 4.13 RC2 to enable  asserting specific error message on expected exception.

* Remove custom accessors in MemoryPolicy as all values are calculated from constants.

* Remove checkstyle and pmd as the codebase will be 100% Kotlin.

* Fix IDE warning in build.gradle by removing static imports.

* Remove unused guava dependencies.

* Improve StoreDefaults docs.
2019-12-26 13:21:52 -05:00
ychescale9
1810355341 Update dependencies and clean up unused ones (#16)
* Update dependencies and clean up unused ones.

* Update okio to 2.4.1 and migrate deprecated APIs to extension functions.

* Update platform and build-tools in travis config.
2019-12-10 20:12:51 -05:00
Mike Nakhimovich
ff06e28697
Update readme to trigger travis build (#15)
* Update readme to trigger travis build

* fix deploy script to not refer to nytimes

* Update deploy_snapshot.sh
2019-12-10 13:48:43 -05:00
Yigit Boyar
915bd7d4d7 StoreResponse (#33)
* Introduce StoreResponse

This CL changes Pipeline API to dispatch StoreResponse instead of Output.
It will allow us to add more metadata into it and also handle things like
source attribution and/or loading state.

This CL only makes the tests pass, does not do anything for actually dispatching
loading state

* first shot at adding a loading state

This CL adds proper StoreResponse to the built in pipelines such
that they can merge information between network and disk.

It needs some cleanup and PipelinePersister's merging logic is
fairly complicated but i couldn't yet find a simpler way to achieve it

* Add more tests to pipeline

Also fixed a bug in cached where it would emit cached value as
Loading even if no refresh is requested

* fix room sample after rebase

* Update the room sample to support refresh

Also some code cleanup in PipelinePersister

* code cleanup

* explain network + disk flow

* Change StoreResponse for plan D

This CL changes store response to act like plan D described here:
https://paper.dropbox.com/doc/Streaming-Data-How-To--AkwrNu0A7\~BikNOP2m20\~R2_AQ-oLBV39GrNimqGDe1vNQMb

Now StoreResponse has 3 types: Data, Error, Loading and each of these have an  field.
Loading and Error does not carry over last data anymore, instead, it is expected downstream
to merge them for UI, if desired.

This change makes Store more verbose but i think it is the right direction to allow
developer to expand on it as desired

* update AGP to 3.6-alpha11

* update pipeline store tests to check finite streams

This CL updates PipelineStoreTest to consume the whole stream
when we expect it to finish rather than limiting the number of
dispatched items

* update RoomActivity to respect new StoreResponse

* add search to room activity

* code cleanup
2019-09-22 11:23:59 -04:00
Mike Nakhimovich
80e834d536
remove clearMemory, upgrade coroutines (#20)
* remove clearMemory, upgrade coroutines

* rebase, pr comments

* fix build

* fix build

* convert more tests to testScope

* few more conversions
2019-08-11 21:27:36 -04:00
fabioCollini
f3f330fa49 Android Gradle Plugin 3.5.0-beta02 and gradle 5.4.1 2019-05-21 20:25:46 +02:00
Brian Plummer
cba0bbd11b update gradle plugin and wrapper for AS 3.5 beta1, temp fix for null input to ParserException 2019-05-17 17:53:56 -04:00
Mike Nakhimovich
e024b64e11 WIP 2019-02-12 11:40:39 -05:00
ychescale9
59f9c68342 Update SDK, build tools, gradle, AGP, Kotlin, and library dependencies. (#371)
* Update SDK, build tools, gradle, AGP, Kotlin, and library dependencies.

* Update travis config with new SDK version.
2019-01-07 15:05:05 +01:00
Mike Nakhimovich
6ac40cd371 StoreRoom (#338)
* roomStore

* kt the app class

* refactor

* fix compilation

* Update .travis.yml

* migrate relevant tests to RoomStore, mark new Room API with @Experimental

* pr feedback

* bump minor rev up

* cleanup store

* create factory, clean up example

* pr comments
2018-05-30 18:56:08 +02:00
Roberto Orgiu
ed378585c2
Merge pull request #328 from pavlospt/fix_memory_policy_default_size
Fix memory policy default size
2018-05-13 14:57:52 -07:00
Jorge Antonio Díaz-Benito Soriano
d26d50a5b6 Remove unnecessary Android-specific stuff (#319) 2018-05-03 09:39:37 -04:00
pavlospt
fda58beffb
Update Gradle version to 4.4 2018-03-29 16:55:43 +03:00
Jorge Antonio Díaz-Benito Soriano
dac878e2ce Gradle updates (#266)
* Gradle Wrapper (all) 3.3 -> 4.1

* Gradle plugin for Android 2.3.2 -> 3.0.0-beta2

This requires upgrading the errorprone plugin to 0.0.11. Also, see
https://stackoverflow.com/questions/44196672/aapt2-compile-failed-invalid-dimen-on-android-3-0-canary-1

gradle plugin

* SDK Build Tools 25.0.2 -> 26.0.1

* Remove retrolambda

* Log error from subscription on PersistingStoreActivity for consistency

* Update dependency inclusion directives to those of the 3.0 plugin

Also, jsr305 and javax usages have been taken from compile to compileOnly
since they are not required beyond.

* Add dependencies that previously were resolved through leaked ones from other artifacts

Now dependency leaks are eliminated thanks to 'implementation' from the 3.0 version of the gradle plugin.

* Remove coupling between middlewares and cache

* Replace mockito-all by mockito-core

mockito-all causes problems related to hamcrest when used with JUnit. See
https://tedvinke.wordpress.com/2013/12/17/mixing-junit-hamcrest-and-mockito-explaining-nosuchmethoderror/

* Remove unused dependency.

* Build Tools 26.0.1 on Travis

* Suppress PMD.AvoidThrowingNullPointerException for the time being

* Avoid PMD synthetic accessor warning
2017-08-17 13:48:12 -04:00
Jorge Antonio Díaz-Benito Soriano
10d0cf6d07 Add store-kotlin module (#229)
* Add store-kotlin module

* Remove useless file

* Fix package in AndroidManifest

* Refactor module tests to assertJ

* Remove wrong annotation

* Add store-kotlin artifact to README

* Add module README

* Add KDoc to Javadoc jar

* Add Experimental annotation

* Mark all public store-kotlin classes as @Experimental

* Replace use of rx's @Experimental with local one instead
2017-06-22 21:22:34 -04:00
Ramona Harrison
730fa5bb66 Prepare next development version. (#222)
* Prepare next development version.

* Update deploy script branch for Rx2 branch
2017-05-23 17:39:00 -04:00
Ramona Harrison
2c2872504b Include develop changes in Rx2 branch (#214)
* Update README.md

* Update README.md

* Update README.md (#175)

* Update README.md

* Close source after  write to filesystem

* Refactor FSFileTest to rx2 package

* remove null check on source and annotate arg with NonNull

* Standardize store.stream() to only emit new items

* Standardize store.stream() to only emit new items

* Remove unneeded call to asObservable()

* Update README.md

* Update README.md

* Fixed PMD violation God Class for RealInternalStore (#179)

* Update README.md

* Fixing dependency importation typo (#186)

* Mike/test (#195)

* new test

* Refactor NoNetworkTest to rx2 package

* Typo fixed (#202)

* Typo fixed

* Simplified by removing generics

* Update build.gradle (#193)

rename app id for sample app

* Add a missing Source.close() call (#200)

* Add Retrolambda plugin on the rest modules (#205)

* Add Retrolambda plugin on the rest modules and modify sample app for new config

* Suppress PMD violation on equals()

* Add Raw to BufferedSource transformer (#198)

* expireAfterAccess added to MemoryPolicy (#199)

* Add test coverage for MemoryPolicyBuilder (#210)

* Add test coverage for MemoryPolicyBuilder

* Checkstyle new line at EOF

* Fix PMD

* Refactor MemoryPolicyBuilderTest to rx2 package

* Deprecate setExpireAfter and getExpireAfter (#211)
2017-05-19 10:25:04 -04:00
Jorge Antonio Díaz-Benito Soriano
147a02d0c1 Do not depend on lint task if it does not exist. (#134) 2017-02-19 10:38:12 -05:00
Mike Nakhimovich
154ee0e533 lets try this travis snapshot deploy again... (#113)
* deploy snapshot
2017-02-07 10:35:41 -05:00
Brian Plummer
be5ba6443a convert store to java, #83 (#85)
convert store to java, #83
2017-01-28 20:52:55 -05:00
Brian Plummer
382c00dbfb start of pmd inclusion (#50)
* start of pmd inclusion

* fix all pmd violations

* fail on pmd

* fail on pmd

* fail on pmd
2017-01-11 15:11:41 -05:00
Brian Plummer
eaa4219dd7 start of checkstyle inclusion... (#48)
* start of checkstyle inclusion

* checkstyle!
2017-01-11 10:04:44 -05:00
digitalbuddha
9badd11494 initial 2017-01-04 14:17:53 -05:00
digitalbuddha
7b86dae1b8 initialCommit 2016-11-29 13:59:48 -05:00