Skip to content

Commit 09a7fc7

Browse files
committed
Prepare for release 0.5.0
1 parent cbaad13 commit 09a7fc7

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
[![Kotlin Experimental](https://kotl.in/badges/experimental.svg)](https://kotlinlang.org/docs/components-stability.html)
1111
[![Build](https://github.com/xxfast/Decompose-Router/actions/workflows/build.yml/badge.svg)](https://github.com/xxfast/Decompose-Router/actions/workflows/build.yml)
12-
[![Kotlin](https://img.shields.io/badge/Kotlin-1.9.0-blue.svg?style=flat&logo=kotlin)](https://kotlinlang.org)
12+
[![Kotlin](https://img.shields.io/badge/Kotlin-1.9.10-blue.svg?style=flat&logo=kotlin)](https://kotlinlang.org)
1313
[![Maven Central](https://img.shields.io/maven-central/v/io.github.xxfast/decompose-router?color=blue)](https://search.maven.org/search?q=g:io.github.xxfast)
1414

1515
![badge-android](http://img.shields.io/badge/platform-android-6EDB8D.svg?style=flat)
@@ -131,7 +131,7 @@ sealed class Screen: Parcelable {
131131
@Composable
132132
fun ListDetailScreen() {
133133
// Create a router with a stack of screen configurations 🚏
134-
val router: Router<Screen> = rememberRouter(listOf(List))
134+
val router: Router<Screen> = rememberRouter { listOf(List) }
135135

136136
// Hoist your screens for each configuration 🏗️
137137
RoutedContent(router = router) { screen ->
@@ -176,9 +176,9 @@ class DetailInstance(savedState: SavedStateHandle, detail: String) : InstanceKee
176176
class MainActivity : ComponentActivity() {
177177
override fun onCreate(savedInstanceState: Bundle?) {
178178
super.onCreate(savedInstanceState)
179-
val rootComponentContext: DefaultComponentContext = defaultComponentContext()
179+
val rootRouterContext: RouterContext = defaultRouterContext()
180180
setContent {
181-
CompositionLocalProvider(LocalComponentContext provides rootComponentContext) {
181+
CompositionLocalProvider(LocalRouterContext provides rootRouterContext) {
182182
MaterialTheme {
183183
ListDetailScreen()
184184
}
@@ -196,11 +196,11 @@ class DetailInstance(savedState: SavedStateHandle, detail: String) : InstanceKee
196196
```kotlin
197197
fun main() {
198198
val lifecycle = LifecycleRegistry()
199-
val rootComponentContext = DefaultComponentContext(lifecycle = lifecycle)
199+
val rootRouterContext = RouterContext(lifecycle = lifecycle)
200200

201201
application {
202202
Window {
203-
CompositionLocalProvider(LocalComponentContext provides rootComponentContext) {
203+
CompositionLocalProvider(LocalRouterContext provides rootRouterContext) {
204204
MaterialTheme {
205205
ListDetailScreen()
206206
}
@@ -218,8 +218,8 @@ class DetailInstance(savedState: SavedStateHandle, detail: String) : InstanceKee
218218
```kotlin
219219
fun main(): UIViewController = ComposeUIViewController {
220220
val lifecycle = LifecycleRegistry()
221-
val rootComponentContext = DefaultComponentContext(lifecycle = lifecycle)
222-
CompositionLocalProvider(LocalComponentContext provides rootComponentContext) {
221+
val rootRouterContext = RouterContext(lifecycle = lifecycle)
222+
CompositionLocalProvider(LocalRouterContext provides rootRouterContext) {
223223
MaterialTheme {
224224
ListDetailScreen()
225225
}
@@ -237,7 +237,7 @@ class DetailInstance(savedState: SavedStateHandle, detail: String) : InstanceKee
237237
fun main() {
238238
onWasmReady {
239239
val lifecycle = LifecycleRegistry()
240-
val rootComponentContext = DefaultComponentContext(lifecycle = lifecycle)
240+
val rootRouterContext = RouterContext(lifecycle = lifecycle)
241241

242242
BrowserViewportWindow(..) {
243243
CompositionLocalProvider(LocalComponentContext provides rootComponentContext) {

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ allprojects {
2828
}
2929

3030
group = "io.github.xxfast"
31-
version = "0.5.0-SNAPSHOT"
31+
version = "0.5.0"
3232

3333
apply(plugin = "org.jetbrains.dokka")
3434
apply(plugin = "maven-publish")

0 commit comments

Comments
 (0)