* [Temp] Remove all modules
* Remove references to Store 4
* Update CHANGELOG
* Update README
* Add Store 5 foundation
Co-authored-by: Andre Claßen <aclassen@users.noreply.github.com>
Co-authored-by: Mike Nakhimovich <mnakhimovich@Mikes-MBP.localdomain>
* Latest is 0.8.0, but 0.4.0 works. Starts to break at 0.5.0.
* Kotlin Atomic Plugin working with 0.14.4
* Atomic Kotlin Plugin working with 0.15.0
* Atomic Kotlin Plugin working with 0.15.1
* Upgrade Gradle Wrapper to 7.4.1
* AGP 4.1.0 -> 4.2.0
* AGP 4.2.0 -> 7.0.2
* AGP 7.0.2 -> 7.1.2
* Kotlin 1.6.10 and Spotless Plugin 6.3.0 Upgrade
* WARNING:The specified Android SDK Build Tools version (29.0.3) is ignored, as it is below the minimum supported version (30.0.3) for Android Gradle Plugin 7.1.2.
* Using --rerun-tasks instead of clean.
* KT Lint formatting update.
Co-authored-by: Sam Edwards <samedwards@dropbox.com>
* Revert to using guava port cache by depending on jar
* Apply suggestions from code review
* revert code to old cache
* clean up build.gradle
* manually remove cache4 entries that are regenerated locally because of some dirty cache?
* bump gradle
* rerun tasks
* try to deflake rx tests
* cache builder tests
* api dump
* bump ktlint to work with 1.4 features
* formatting
Co-authored-by: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
* Move Fetcher factories into companion
Fetcher factories were global methods, which made them hard
to discover since IDE cannot easily auto-complete.
This PR moves them into the companion of Fetcher while also
making Fetcher a real interface instead of a typealias.
Even though it is a bit more code for the developer, now they
can easily discover how to create a Fetcher by typing Fetcher.
Fixes: #167
* make rx methods start w/ from too for consistency
* Rename fether factories to be more clear, hopefully :/
* remove fetch method, use invoke instead
* Make Fetcher.from the one that receives a suspend fun.
Create Fetcher.fromFlow for the flowing version.
Rename both SourceOfTruth builder methods to . Rely on param names to disambiguate
* use .of instead, this seems better to me.
We should probably get rid of StoreBuilder.from and make it
Store.builder()
* fix jvm name for SourceOfTruth.of with flow function
* fix RxSourceOfTruth name to match original class
* specify bounds for FactoryFetcher
* updates per PR review
* update graph per SoT rename
* update rxjava3 APIs as well
These appeared after i rebased, missed them completely.
Also fixed some tests, appearantly IJ parameter name refactor does
not always work
* supress wrong unnecessary cast warning
without this, multicaster cannot resolve to the base StoreResponse type
* upgade gradle, try to fix build by disabling caching
* split subscribers
* resubscribe
Co-authored-by: miken <miken@dropbox.com>
Co-authored-by: miken <miken@dropbox.com>
* [WIP] Add code coverage
* Get multi-module and merging working
* Add CodeCov
* Update location of report.xml
* Check instead of build depends on Jacoco
* Do not merge coverage
* Ignore tests
* update comment
* Fix typos.
* Gradle 6.1, AGP 4.0.0-alpha09, lifecycle 2.2.0.
* Add experimental invalidateAll() support and @ExperimentalStoreAPI annotation.
* Update sample with deleteAll function.
* Update README.md with deleteAll function.
* Add a section to README.md on clearing store entries.
* Rewrite tests without mocking. Move test utils / helpers to a single package.
* Code formatting and cleanups.
* Use StoreResponse.Data instead of DataWithOrigin in ClearAllStoreTest and ClearStoreByKeyTest.
* Simplified samples. Refactor tests.
* Gradle 6.1.1.
* 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.
* 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.
* 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
* 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
* 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
* 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
* 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)