Commit graph

28 commits

Author SHA1 Message Date
mnakhimovich
fee0bccde7 [Store5] Target Android, iOS, JVM, JS (#493)
* [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>
2023-01-16 16:31:12 -05:00
Sam Edwards
83205da5ec
Version Bumps - AGP 7.1.2, Kotlin 1.6.10 and related updates (#414)
* 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>
2022-03-17 14:03:15 -04:00
Sam Edwards
37411e06c1
Non-breaking Gradle Upgrade. Things went crazy when I went straight to 7.4.1, so going conservative to 6.9.2 (#412)
Co-authored-by: Sam Edwards <samedwards@dropbox.com>
2022-03-16 20:10:31 -04:00
David Chang
0cdf25480a
Upgrade AGP to 4.1 and Gradle to 6.6 (#357)
* Maven publish plugin

* Revert "Maven publish plugin"

This reverts commit 5d0a3d5312235f95e7a3659b78e02bb5b67ffcc2.

* Upgrade AGP to 4.1 and Gradle to 6.6
2021-12-08 07:10:45 -05:00
Eyal Guthmann
e773021fec
Revert to use the old guava port cache (via jar) (#200)
* 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>
2020-09-14 14:49:34 -07:00
Eyal Guthmann
b18db6f61f
Minor cleanup in RealStore.diskNetworkCombined (#190)
* Minor cleanup in RealStore.diskNetworkCombined

* add missing comment

* one more if-else -> when

* lint
2020-07-23 16:30:57 -07:00
Yigit Boyar
b86050496c
Yigit/move fetcher factories to fetcher (#168) (#181)
* 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>
2020-06-19 06:00:50 -04:00
Yang
7c3ce55b63
Coroutines 1.3.5 (#166)
* Update Kotlin, Coroutines, Rx2, OkHttp, Okio, Gradle.

* Clean up @FlowPreview @ExperimentalCoroutinesApi which are no longer required.
2020-05-09 10:21:25 -04:00
Yang
38baeb7c8b
Kotlin 1.3.70 and other dependencies updates. (#125)
* Update Kotlin, Gradle, binary-compatibility-validator, AGP, AndroidX, retrofit, okhttp, rx2.

* Replace deprecated @UseExperimental with @OptIn.

* Gradle 6.2.2.

* Update Coroutines to 1.3.4. Fix more compiler warnings.

* Update build-tools for travis.
2020-03-07 09:38:02 -05:00
Yang
66a3d3a071
Gradle 6.2. (#111)
* Gradle 6.2.

* Use single-threaded scheduler for test.

* Revert "Use single-threaded scheduler for test."
2020-02-19 13:14:14 -05:00
David Chang
f6f58c42c0
Fix CodeCov by changing gradle-wrapper to 6.1 (#108)
* Revert "Fix gradle wrapper version. (#102)"

This reverts commit 7cc48b79c3.

* Update gradle-wrapper

* Update gradle-wrapper
2020-02-17 06:29:53 -05:00
Yang
7cc48b79c3
Fix gradle wrapper version. (#102) 2020-02-13 19:59:02 -08:00
William Clausen
12a2600551 Prepare for release 4.0.0-alpha03 2020-02-13 11:40:22 -08:00
Yang
613a5c8296 Add support for purging all store entries (#79)
* 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.
2020-01-28 09:02:28 -08:00
ychescale9
7ee32a7468 Clean up build configs (#62)
* Update dependencies, clean up unused dependencies.

* Remove unused checkstyle and pmd rulesets.

* Use `plugins` block.

* Fix compiler warnings.
2020-01-13 12:43:41 -05:00
Mike Nakhimovich
267f803db0
fix dokka, update comments, integrate persister (#56)
* fix dokka, update comments, integrate persister
2020-01-07 14:08:53 -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
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
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
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
digitalbuddha
7b86dae1b8 initialCommit 2016-11-29 13:59:48 -05:00