Skip to content

Commit cf9d9b1

Browse files
authored
Release 5.1.0-alpha01 (#597)
1 parent c3950a1 commit cf9d9b1

26 files changed

Lines changed: 34 additions & 30 deletions

File tree

README.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,17 @@
3232

3333
### Including Store In Your Project
3434

35-
> **Note**
36-
>
37-
> **[AtomicFU](https://github.com/Kotlin/kotlinx-atomicfu) is required ([#503](https://github.com/MobileNativeFoundation/Store/issues/503))**
38-
3935
#### Android
4036
```kotlin
41-
implementation "org.mobilenativefoundation.store:store5:5.0.0"
42-
implementation "org.jetbrains.kotlinx:atomicfu:0.18.5"
37+
implementation "org.mobilenativefoundation.store:store5:5.1.0-alpha01"
4338
```
4439

4540
#### Multiplatform (Common, JVM, Native, JS)
4641

4742
```kotlin
4843
commonMain {
4944
dependencies {
50-
implementation("org.mobilenativefoundation.store:store5:5.0.0")
51-
implementation("org.jetbrains.kotlinx:atomicfu:0.18.5")
45+
implementation("org.mobilenativefoundation.store:store5:5.1.0-alpha01")
5246
}
5347
}
5448
```
@@ -128,7 +122,7 @@ store.clear(key)
128122
### License
129123

130124
```text
131-
Copyright (c) 2022 Mobile Native Foundation.
125+
Copyright (c) 2024 Mobile Native Foundation.
132126
Licensed under the Apache License, Version 2.0 (the "License");
133127
you may not use this file except in compliance with the License.
134128
```

build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ buildscript {
2020
classpath(libs.maven.publish.plugin)
2121
classpath(libs.kover.plugin)
2222
classpath(libs.atomic.fu.gradle.plugin)
23-
classpath(libs.molecule.gradle.plugin)
2423
}
2524
}
2625

store/src/commonMain/kotlin/org/mobilenativefoundation/store/store5/ExperimentalStoreApi.kt renamed to core/src/commonMain/kotlin/org/mobilenativefoundation/store/core5/ExperimentalStoreApi.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.mobilenativefoundation.store.store5
1+
package org.mobilenativefoundation.store.core5
22

33
/**
44
* Marks declarations that are still **experimental** in store API.

core/src/commonMain/kotlin/org/mobilenativefoundation/store/core5/InsertionStrategy.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.mobilenativefoundation.store.core5
22

3+
@ExperimentalStoreApi
34
enum class InsertionStrategy {
45
APPEND,
56
PREPEND,

core/src/commonMain/kotlin/org/mobilenativefoundation/store/core5/KeyProvider.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.mobilenativefoundation.store.core5
22

3+
@ExperimentalStoreApi
34
interface KeyProvider<Id : Any, Single : StoreData.Single<Id>> {
45
fun fromCollection(key: StoreKey.Collection<Id>, value: Single): StoreKey.Single<Id>
56
fun fromSingle(key: StoreKey.Single<Id>, value: Single): StoreKey.Collection<Id>

core/src/commonMain/kotlin/org/mobilenativefoundation/store/core5/StoreData.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package org.mobilenativefoundation.store.core5
55
* Every item that implements the [StoreData] interface must have a means of identification.
66
* This is useful in scenarios when data can be represented as singles or collections.
77
*/
8-
8+
@ExperimentalStoreApi
99
interface StoreData<out Id : Any> {
1010

1111
/**

core/src/commonMain/kotlin/org/mobilenativefoundation/store/core5/StoreKey.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package org.mobilenativefoundation.store.core5
66
* Provides mechanisms for ID-based fetch, page-based fetch, and cursor-based fetch.
77
* Includes options for sorting and filtering.
88
*/
9+
@ExperimentalStoreApi
910
interface StoreKey<out Id : Any> {
1011

1112
/**

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ org.gradle.jvmargs=-XX:MaxMetaspaceSize=2G
88

99
# POM file
1010
GROUP=org.mobilenativefoundation.store
11-
VERSION_NAME=5.1.0-SNAPSHOT
11+
VERSION_NAME=5.1.0-alpha01
1212
POM_PACKAGING=pom
1313
POM_DESCRIPTION = Store5 is a Kotlin Multiplatform network-resilient repository layer
1414

paging/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ kotlin {
2121
implementation(project(":store"))
2222
implementation(project(":cache"))
2323
implementation(compose.runtime)
24-
implementation(libs.molecule.runtime)
2524
implementation(compose.ui)
2625
implementation(compose.foundation)
2726
implementation(compose.material)

paging/src/commonMain/kotlin/org/mobilenativefoundation/store/paging5/LaunchPagingStore.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import kotlinx.coroutines.flow.asStateFlow
1010
import kotlinx.coroutines.flow.drop
1111
import kotlinx.coroutines.flow.first
1212
import kotlinx.coroutines.launch
13+
import org.mobilenativefoundation.store.core5.ExperimentalStoreApi
1314
import org.mobilenativefoundation.store.core5.StoreData
1415
import org.mobilenativefoundation.store.core5.StoreKey
15-
import org.mobilenativefoundation.store.store5.ExperimentalStoreApi
1616
import org.mobilenativefoundation.store.store5.MutableStore
1717
import org.mobilenativefoundation.store.store5.Store
1818
import org.mobilenativefoundation.store.store5.StoreReadRequest
@@ -27,6 +27,7 @@ private class StopProcessingException : Exception()
2727
* @param stream A lambda that invokes [Store.stream].
2828
* @return A read-only [StateFlow] reflecting the state of the Store.
2929
*/
30+
@ExperimentalStoreApi
3031
private fun <Id : Any, Key : StoreKey<Id>, Output : StoreData<Id>> launchPagingStore(
3132
scope: CoroutineScope,
3233
keys: Flow<Key>,
@@ -73,6 +74,7 @@ private fun <Id : Any, Key : StoreKey<Id>, Output : StoreData<Id>> launchPagingS
7374
* Initializes and returns a [StateFlow] that reflects the state of the [Store], updating by a flow of provided keys.
7475
* @see [launchPagingStore].
7576
*/
77+
@ExperimentalStoreApi
7678
fun <Id : Any, Key : StoreKey<Id>, Output : StoreData<Id>> Store<Key, Output>.launchPagingStore(
7779
scope: CoroutineScope,
7880
keys: Flow<Key>,
@@ -86,7 +88,7 @@ fun <Id : Any, Key : StoreKey<Id>, Output : StoreData<Id>> Store<Key, Output>.la
8688
* Initializes and returns a [StateFlow] that reflects the state of the [Store], updating by a flow of provided keys.
8789
* @see [launchPagingStore].
8890
*/
89-
@OptIn(ExperimentalStoreApi::class)
91+
@ExperimentalStoreApi
9092
fun <Id : Any, Key : StoreKey<Id>, Output : StoreData<Id>> MutableStore<Key, Output>.launchPagingStore(
9193
scope: CoroutineScope,
9294
keys: Flow<Key>,
@@ -96,6 +98,7 @@ fun <Id : Any, Key : StoreKey<Id>, Output : StoreData<Id>> MutableStore<Key, Out
9698
}
9799
}
98100

101+
@ExperimentalStoreApi
99102
private fun <Id : Any, Key : StoreKey.Collection<Id>, Output : StoreData<Id>> joinData(
100103
key: Key,
101104
prevResponse: StoreReadResponse<Output>,

0 commit comments

Comments
 (0)