Skip to content

Commit 8accde9

Browse files
author
Aleksha
committed
update deps + refac
1 parent fd4d800 commit 8accde9

File tree

75 files changed

+517
-392
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+517
-392
lines changed

docs/Dataflow/DataStore/usage.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
## Overview
44

55
The API can be accessed through:
6-
- `shared.data.source.keyvalue.KeyValueSource` - base class at the core module level.
7-
- `shared.data.source.keyvalue.DataStoreSource` - implementation of the base class.
6+
- `shared.data.source.settings.SettingsSource` - base class at the core module level.
7+
- `shared.data.source.settings.DataStoreSource` - implementation of the base class.
88

9-
**KeyValueSource** provides the following methods:
9+
**SettingsSource** provides the following methods:
1010

1111
- `read(key: String): T?` - Reads data of type [T] associated with the given [key].
1212
- `save(key: String, value: T)` - Saves the provided [value] of type [T] with the given [key].
@@ -23,12 +23,12 @@ To start using, just inject it to your DI managed class.
2323

2424
```kotlin
2525
class TemplateViewModel @Inject constructor(
26-
private val keyValueSource: KeyValueSource
26+
private val settingsSource: SettingsSource
2727
) : BaseViewModel() {
2828

2929
override fun doBind() = async("Init settings") {
3030
...
31-
val passcode: String? = keyValueSource.read("name")
31+
val passcode: String? = settingsSource.read("name")
3232
...
3333
}
3434
}

docs/Dataflow/Multiplatform Settings/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# About
22

33
During the application lifecycle, it may be necessary to persist data across app reopenings (for example, chosen language, theme, font size, and other preferences).
4-
Key-value storage provides an efficient way to store and retrieve such data using a simple yet powerful API that can manage data of any complexity.
4+
Settings provide an efficient way to store and retrieve such data using a simple yet powerful API that can manage data of any complexity.
55

66
# Links
77

docs/Dataflow/Multiplatform Settings/usage.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
## Overview
44

55
The API can be accessed through:
6-
- `shared.data.source.keyvalue.KeyValueSource` - base class at the core module level.
7-
- `shared.data.source.keyvalue.SettingsKeyValueSource` - implementation of the base class.
6+
- `shared.data.source.settings.SettingsSource` - base class at the core module level.
7+
- `shared.data.source.settings.SettingsSettingsSource` - implementation of the base class.
88

9-
**KeyValueSource** provides the following methods:
9+
**SettingsSource** provides the following methods:
1010

1111
- `read(key: String): T?` - Reads data of type [T] associated with the given [key].
1212
- `save(key: String, value: T)` - Saves the provided [value] of type [T] with the given [key].
@@ -17,18 +17,18 @@ The API can be accessed through:
1717

1818
## Example
1919

20-
Class instance is pre-configured via dependency injection (DI) as a singleton in `app.di.common.KeyValueSourceModule`.
20+
Class instance is pre-configured via dependency injection (DI) as a singleton in `app.di.common.SettingsSourceModule`.
2121

2222
To start using, just inject it to your DI managed class.
2323

2424
```kotlin
2525
class TemplateViewModel @Inject constructor(
26-
private val keyValueSource: KeyValueSource
26+
private val settingsSource: SettingsSource
2727
) : BaseViewModel() {
2828

2929
override fun doBind() = async("Init settings") {
3030
...
31-
val passcode: String? = keyValueSource.read("name")
31+
val passcode: String? = settingsSource.read("name")
3232
...
3333
}
3434
}

docs/Platform/iOS/usage.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@
33
## Run
44

55
https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-multiplatform-create-first-app.html#run-your-application-on-ios
6+
7+
```
8+
Once everything is configured, ensure that the root file `./gradlew` is executable.
9+
```

docs/Userflow/Local Passcode Flow/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ val passcodeModule = module {
1818
persistentKey = "passcode_config",
1919
resumeTimeout = 10.seconds.inWholeMilliseconds,
2020
encryptionSource = get(),
21-
keyValueSource = get(),
21+
settingsSource = get(),
2222
)
2323
}
2424
}

docs/Userflow/Save Theme API/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The feature utilizes `app.feature.theme.provide.presentation.ThemeProvider` to c
1111
- Persist its state whenever it changes.
1212
- Restore the last state when the app is reopened.
1313

14-
The logic is handled by `app.feature.theme.provide.presentation.ThemePersistenceViewModel`.
14+
The logic is handled by `app.feature.theme.provide.presentation.ThemeStatefulViewModel`.
1515

1616
Thus, whenever you update the current active application theme, it is automatically saved across app restarts.
1717

processor/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
apply from: "${project.rootDir}/gradle/kotlin/processor.gradle"
22

33
group = 'com.kotlitecture.kotli'
4-
version = '0.12.0'
4+
version = '0.13.0'

processor/src/main/kotlin/kotli/template/multiplatform/compose/MultiplatformComposeTemplateProcessor.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ import kotli.template.multiplatform.compose.dataflow.common.CommonDataFlowProvid
1717
import kotli.template.multiplatform.compose.dataflow.config.ConfigProvider
1818
import kotli.template.multiplatform.compose.dataflow.database.DatabaseProvider
1919
import kotli.template.multiplatform.compose.dataflow.encryption.EncryptionProvider
20+
import kotli.template.multiplatform.compose.dataflow.expression.ExpressionProvider
2021
import kotli.template.multiplatform.compose.dataflow.http.HttpProvider
21-
import kotli.template.multiplatform.compose.dataflow.keyvalue.KeyValueProvider
22-
import kotli.template.multiplatform.compose.dataflow.keyvalue.settings.SettingsKeyValueProcessor
22+
import kotli.template.multiplatform.compose.dataflow.settings.SettingsProvider
23+
import kotli.template.multiplatform.compose.dataflow.settings.basic.BasicSettingsProcessor
2324
import kotli.template.multiplatform.compose.dataflow.paging.PagingProvider
2425
import kotli.template.multiplatform.compose.essentials.buildtool.BuildToolProvider
2526
import kotli.template.multiplatform.compose.essentials.design.DesignSystemProvider
@@ -57,7 +58,7 @@ object MultiplatformComposeTemplateProcessor : BaseTemplateProcessor() {
5758
features = listOf(
5859
Feature(IOSPlatformProcessor.ID),
5960
Feature(AndroidPlatformProcessor.ID),
60-
Feature(SettingsKeyValueProcessor.ID),
61+
Feature(BasicSettingsProcessor.ID),
6162
Feature(DataLoaderProcessor.ID),
6263
Feature(SaveThemeProcessor.ID),
6364
Feature(ChangeThemeProcessor.ID),
@@ -84,8 +85,9 @@ object MultiplatformComposeTemplateProcessor : BaseTemplateProcessor() {
8485

8586
// dataflow
8687
CommonDataFlowProvider,
87-
KeyValueProvider,
88+
SettingsProvider,
8889
EncryptionProvider,
90+
ExpressionProvider,
8991
CacheProvider,
9092
ConfigProvider,
9193
DatabaseProvider,

processor/src/main/kotlin/kotli/template/multiplatform/compose/Rules.kt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ object Rules {
8080

8181
// design
8282
const val SharedDesignSrcDir = "${SharedDesignDir}/src"
83-
const val SharedDesignComponentDir =
84-
"${SharedDesignSrcDir}/commonMain/kotlin/shared/design/component"
83+
const val SharedDesignComponentDir = "${SharedDesignSrcDir}/commonMain/kotlin/shared/design/component"
8584
const val AppIconsKt = "${SharedDesignSrcDir}/commonMain/kotlin/shared/design/icon/AppIcons.kt"
8685
const val AppPlaceholder = "${SharedDesignComponentDir}/AppPlaceholder.kt"
8786
const val AppMarkdown = "${SharedDesignComponentDir}/AppMarkdown.kt"
@@ -111,15 +110,18 @@ object Rules {
111110
// dataflow -> http
112111
const val HttpSource = "*/*HttpSource*.kt"
113112

114-
// dataflow -> keyvalue
115-
const val KeyValueSource = "*/*KeyValueSource*.kt"
116-
const val SettingsKeyValueSource = "*/*SettingsKeyValueSource*.kt"
113+
// dataflow -> settings
114+
const val SettingsSource = "*/*SettingsSource*.kt"
115+
const val BasicSettingsSource = "*/*BasicSettingsSource*.kt"
117116
const val DataStoreSource = "*/*DataStoreSource.kt"
118117

119118
// dataflow -> encryption
120119
const val EncryptionSource = "*/*EncryptionSource*.kt"
121120
const val EncryptionDir = "${SharedDataDir}/src/commonMain/kotlin/shared/data/source/encryption"
122121

122+
// dataflow -> expression
123+
const val ExpressionSource = "*/*ExpressionEvaluator*.kt"
124+
123125
// dataflow -> AiSource
124126
const val AiSource = "*/*AiSource*.kt"
125127

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package kotli.template.multiplatform.compose.dataflow.expression
2+
3+
import kotli.engine.FeatureProcessor
4+
import kotli.template.multiplatform.compose.dataflow.BaseDataFlowProvider
5+
import kotli.template.multiplatform.compose.dataflow.expression.basic.BasicExpressionProcessor
6+
7+
object ExpressionProvider : BaseDataFlowProvider() {
8+
9+
override fun getId(): String = "dataflow.expression"
10+
11+
override fun createProcessors(): List<FeatureProcessor> = listOf(
12+
BasicExpressionProcessor,
13+
)
14+
}

0 commit comments

Comments
 (0)