|
16 | 16 | [](https://www.reddit.com/submit?url=https%3A%2F%2Fgithub.com%2Fnsk90%2Fkstatemachine&title=I%20like%20KStateMachine%20library)
|
17 | 17 |
|
18 | 18 |
|
19 |
| -[Documentation](https://kstatemachine.github.io/kstatemachine) | [Quick start](#quick-start-sample) | [Samples](#samples) | [Install](#install) | [License](#license) | [Discussions](https://github.com/nsk90/kstatemachine/discussions) |
| 19 | +[Documentation](https://kstatemachine.github.io/kstatemachine) | [Quick start](#quick-start-sample) | [Samples](#samples) | [Install](#install) | [Sponsors](#sponsors-) | [License](#license) | [Discussions](https://github.com/nsk90/kstatemachine/discussions) |
20 | 20 |
|
21 | 21 | KStateMachine is a Kotlin DSL library for creating [state machines](https://en.wikipedia.org/wiki/Finite-state_machine)
|
22 | 22 | and [statecharts](https://www.sciencedirect.com/science/article/pii/0167642387900359/pdf).
|
@@ -64,13 +64,6 @@ State management features:
|
64 | 64 | > [!IMPORTANT]
|
65 | 65 | > SEE FULL [DOCUMENTATION HERE](https://kstatemachine.github.io/kstatemachine)
|
66 | 66 |
|
67 |
| -> [!NOTE] |
68 |
| -> The library is in a development phase. You are welcome to propose useful features, or contribute to the project. |
69 |
| -> |
70 |
| -> Don't forget to push the ⭐ if you like this project. |
71 |
| -> |
72 |
| -> You can donate or become a sponsor to support the project, using ❤️ github-sponsors button. |
73 |
| -
|
74 | 67 | ## Quick start sample
|
75 | 68 |
|
76 | 69 | ### Finishing traffic light
|
@@ -157,114 +150,40 @@ fun main() = runBlocking {
|
157 | 150 |
|
158 | 151 | KStateMachine is available on `Maven Central` and `JitPack` repositories.
|
159 | 152 |
|
160 |
| -The library consists of 2 components: |
161 |
| - |
162 |
| -* `kstatemachine` - (mandatory) state machine implementation (depends only on Kotlin Standard library) |
163 |
| -* `kstatemachine-coroutines` - (optional) add-ons for working with coroutines (depends on Kotlin Coroutines library) |
164 |
| - |
165 |
| -Please note that starting from `v0.22.0` the library switched to Kotlin Multiplatform and artifact naming has changed. |
| 153 | +See [install section in the docs](https://kstatemachine.github.io/kstatemachine/#install) for details. |
166 | 154 |
|
167 | 155 | ### Maven Central
|
168 | 156 |
|
169 |
| -Add dependencies: |
170 |
| - |
171 | 157 | ```kotlin
|
172 |
| -// kotlin |
173 | 158 | dependencies {
|
174 |
| - // multiplatform artifacts (starting from 0.22.0) |
| 159 | + // multiplatform artifacts, where <Tag> is a library version. |
175 | 160 | implementation("io.github.nsk90:kstatemachine:<Tag>")
|
176 | 161 | implementation("io.github.nsk90:kstatemachine-coroutines:<Tag>")
|
177 |
| - // or JVM/Android artifacts (starting from 0.22.0) |
178 |
| - implementation("io.github.nsk90:kstatemachine-jvm:<Tag>") |
179 |
| - implementation("io.github.nsk90:kstatemachine-coroutines-jvm:<Tag>") |
180 |
| - // or iOS artifacts (starting from 0.22.1) |
181 |
| - implementation("io.github.nsk90:kstatemachine-iosarm64:<Tag>") |
182 |
| - implementation("io.github.nsk90:kstatemachine-coroutines-iosarm64:<Tag>") |
183 |
| - |
184 |
| - implementation("io.github.nsk90:kstatemachine-iosx64:<Tag>") |
185 |
| - implementation("io.github.nsk90:kstatemachine-coroutines-iosx64:<Tag>") |
186 |
| - |
187 |
| - implementation("io.github.nsk90:kstatemachine-iossimulatorarm64:<Tag>") |
188 |
| - implementation("io.github.nsk90:kstatemachine-coroutines-iossimulatorarm64:<Tag>") |
189 | 162 | }
|
190 | 163 | ```
|
191 | 164 |
|
192 |
| -```groovy |
193 |
| -// groovy |
194 |
| -dependencies { |
195 |
| - // multiplatform artifacts |
196 |
| - implementation 'io.github.nsk90:kstatemachine:<Tag>' |
197 |
| - implementation 'io.github.nsk90:kstatemachine-coroutines:<Tag>' // optional |
198 |
| - // etc.. |
199 |
| -} |
200 |
| -``` |
201 |
| - |
202 |
| -Where `<Tag>` is a library version. |
203 |
| - |
204 |
| -You can see official docs |
205 |
| -about [dependencies on multiplatform libraries](https://kotlinlang.org/docs/multiplatform-add-dependencies.html#library-used-in-specific-source-sets) |
206 |
| - |
207 |
| -### JitPack (deprecated) |
208 |
| - |
209 |
| -Currently, `JitPack` does not support Kotlin multiplatform artifacts. |
210 |
| -So versions starting from `0.22.0` are not available there, use `Maven Central` instead. |
211 |
| - |
212 |
| -Add the [JitPack](https://jitpack.io/#nsk90/kstatemachine/Tag) repository to your build file. Add it in your |
213 |
| -root `build.gradle` at the end of repositories: |
214 |
| - |
215 |
| -```kotlin |
216 |
| -// kotlin |
217 |
| -repositories { |
218 |
| - // ... |
219 |
| - maven { url = uri("https://jitpack.io") } |
220 |
| -} |
221 |
| -``` |
| 165 | +## Build |
222 | 166 |
|
223 |
| -```groovy |
224 |
| -// groovy |
225 |
| -allprojects { |
226 |
| - repositories { |
227 |
| - // ... |
228 |
| - maven { url 'https://jitpack.io' } |
229 |
| - } |
230 |
| -} |
231 |
| -``` |
| 167 | +Run `./gradlew build` or build with `Intellij IDEA`. |
232 | 168 |
|
233 |
| -Add dependencies: |
| 169 | +## Contribution |
234 | 170 |
|
235 |
| -```kotlin |
236 |
| -// kotlin |
237 |
| -dependencies { |
238 |
| - implementation("com.github.nsk90:kstatemachine:<Tag>") |
239 |
| - // note that group is different in second artifact, long group name also works for first artifact but not vise versa |
240 |
| - // it is some strange JitPack behaviour |
241 |
| - implementation("com.github.nsk90.kstatemachine:kstatemachine-coroutines:<Tag>") // optional |
242 |
| -} |
243 |
| -``` |
| 171 | +The library is in a active development phase. You are welcome to propose useful features and contribute to the project. |
| 172 | +See [CONTRIBUTING](./CONTRIBUTING.md) file. |
244 | 173 |
|
245 |
| -```groovy |
246 |
| -// groovy |
247 |
| -dependencies { |
248 |
| - implementation 'com.github.nsk90:kstatemachine:<Tag>' |
249 |
| - // note that group is different in second artifact, long group name also works for first artifact but not vise versa |
250 |
| - // it is some strange JitPack behaviour |
251 |
| - implementation 'com.github.nsk90.kstatemachine:kstatemachine-coroutines:<Tag>' // optional |
252 |
| -} |
253 |
| -``` |
| 174 | +## Sponsors ❤ |
254 | 175 |
|
255 |
| -Where `<Tag>` is a library version. |
| 176 | +> [!NOTE] |
| 177 | +> Please, push the ⭐ if you like this project |
256 | 178 |
|
257 |
| -## Build |
| 179 | +I highly appreciate that you donate or become a sponsor to support the project. |
| 180 | +Use ❤️ github-sponsors button to see supported methods. |
258 | 181 |
|
259 |
| -Run `./gradlew build` or build with `Intellij IDEA`. |
| 182 | +## Thanks to supporters |
260 | 183 |
|
261 |
| -To run tests from IDE download official [Kotest plugin](https://github.com/kotest/kotest-intellij-plugin). |
| 184 | +[](https://github.com/nsk90/kstatemachine/stargazers) |
| 185 | +[](https://github.com/nsk90/kstatemachine/network/members) |
262 | 186 |
|
263 | 187 | ## License
|
264 | 188 |
|
265 |
| -Licensed under permissive [Boost Software License](./LICENSE) |
266 |
| - |
267 |
| -## Thanks to supporters |
268 |
| - |
269 |
| -[](https://github.com/nsk90/kstatemachine/stargazers) |
270 |
| -[](https://github.com/nsk90/kstatemachine/network/members) |
| 189 | +Licensed under permissive [Boost Software License](./LICENSE) |
0 commit comments