Skip to content

Commit ba212a7

Browse files
authored
Merge pull request #89 from rickclephas/feature/kotlin-2.1.21
Kotlin 2.1.21
2 parents f226dad + eba3360 commit ba212a7

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

.idea/kotlinc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ buildscript {
1313

1414
allprojects {
1515
group = "com.rickclephas.kmp"
16-
version = "1.0.0-BETA-10"
16+
version = "1.0.0-BETA-10-kotlin-2.1.21-RC2"
1717

1818
repositories {
1919
mavenCentral()

gradle/libs.versions.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[versions]
2-
kotlin = "2.1.20"
2+
kotlin = "2.1.21"
33
kotlinx-coroutines = "1.10.1"
44
android = "8.2.0"
55
androidx-lifecycle = "2.8.7"
@@ -8,8 +8,8 @@ atomicfu = "0.26.1"
88
# Sample versions
99
androidx-compose = "2023.10.01"
1010
androidx-fragment = "1.6.2"
11-
ksp = "2.1.20-1.0.31"
12-
nativecoroutines = "1.0.0-ALPHA-41"
11+
ksp = "2.1.21-2.0.1"
12+
nativecoroutines = "1.0.0-ALPHA-43"
1313

1414
[libraries]
1515
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }

sample/shared/src/commonMain/kotlin/com/rickclephas/kmp/observableviewmodel/sample/shared/TimeTravelViewModel.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,30 @@ open class TimeTravelViewModel: ViewModel() {
1313
* A [StateFlow] that emits the actual time.
1414
*/
1515
@NativeCoroutinesState
16-
val actualTime = clockTime.map { formatTime(it) }
16+
val actualTime: StateFlow<String> = clockTime.map { formatTime(it) }
1717
.stateIn(viewModelScope, SharingStarted.WhileSubscribed(), "N/A")
1818

1919
private val _travelEffect = MutableStateFlow<TravelEffect?>(viewModelScope, null)
2020
/**
2121
* A [StateFlow] that emits the applied [TravelEffect].
2222
*/
2323
@NativeCoroutinesState
24-
val travelEffect = _travelEffect.asStateFlow()
24+
val travelEffect: StateFlow<TravelEffect?> = _travelEffect.asStateFlow()
2525

2626
/**
2727
* A [StateFlow] that indicates if the [currentTime] is fixed.
2828
* @see startTime
2929
* @see stopTime
3030
*/
3131
@NativeCoroutinesState
32-
val isFixedTime = _travelEffect.map { it is TravelEffect.Fixed }
32+
val isFixedTime: StateFlow<Boolean> = _travelEffect.map { it is TravelEffect.Fixed }
3333
.stateIn(viewModelScope, SharingStarted.WhileSubscribed(), false)
3434

3535
/**
3636
* A [StateFlow] that emits the current time.
3737
*/
3838
@NativeCoroutinesState
39-
val currentTime = combine(clockTime, _travelEffect) { actualTime, travelEffect ->
39+
val currentTime: StateFlow<String> = combine(clockTime, _travelEffect) { actualTime, travelEffect ->
4040
formatTime(actualTime + travelEffect)
4141
}.stateIn(viewModelScope, SharingStarted.WhileSubscribed(), "N/A")
4242

0 commit comments

Comments
 (0)