Skip to content

Commit af9cc17

Browse files
committed
Merge branch 'master' into feature/kotlin-2.2.0
2 parents 9c25e25 + fa25d18 commit af9cc17

File tree

6 files changed

+24
-22
lines changed

6 files changed

+24
-22
lines changed

KMPObservableViewModelCore.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'KMPObservableViewModelCore'
3-
s.version = '1.0.0-BETA-10'
3+
s.version = '1.0.0-BETA-11'
44
s.summary = 'Library to share Kotlin ViewModels with Swift'
55

66
s.homepage = 'https://github.com/rickclephas/KMP-ObservableViewModel'

KMPObservableViewModelCoreObjC.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'KMPObservableViewModelCoreObjC'
3-
s.version = '1.0.0-BETA-10'
3+
s.version = '1.0.0-BETA-11'
44
s.summary = 'Library to share Kotlin ViewModels with Swift'
55

66
s.homepage = 'https://github.com/rickclephas/KMP-ObservableViewModel'

KMPObservableViewModelSwiftUI.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'KMPObservableViewModelSwiftUI'
3-
s.version = '1.0.0-BETA-10'
3+
s.version = '1.0.0-BETA-11'
44
s.summary = 'Library to share Kotlin ViewModels with SwiftUI'
55

66
s.homepage = 'https://github.com/rickclephas/KMP-ObservableViewModel'

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,21 @@ but not all targets support AndroidX and/or SwiftUI interop:
2121
| JS || - | - |
2222
| Wasm || - | - |
2323

24-
The latest version of the library uses Kotlin version `2.1.20`.
24+
The latest version of the library uses Kotlin version `2.1.21`.
2525
Compatibility versions for older and/or preview Kotlin versions are also available:
2626

27-
| Version | Version suffix | Kotlin | Coroutines | AndroidX Lifecycle |
28-
|--------------|----------------------|:----------:|:----------:|:------------------:|
29-
| **_latest_** | **_no suffix_** | **2.1.20** | **1.10.1** | **2.8.7** |
30-
| 1.0.0-BETA-9 | _no suffix_ | 2.1.10 | 1.10.1 | 2.8.7 |
31-
| 1.0.0-BETA-8 | _no suffix_ | 2.1.0 | 1.9.0 | 2.8.4 |
32-
| 1.0.0-BETA-7 | _no suffix_ | 2.0.21 | 1.9.0 | 2.8.4 |
33-
| 1.0.0-BETA-6 | _no suffix_ | 2.0.20 | 1.9.0 | 2.8.4 |
34-
| 1.0.0-BETA-4 | _no suffix_ | 2.0.10 | 1.8.1 | 2.8.4 |
35-
| 1.0.0-BETA-3 | _no suffix_ | 2.0.0 | 1.8.1 | 2.8.0 |
36-
| 1.0.0-BETA-2 | _no suffix_ | 1.9.24 | 1.8.1 | 2.8.0 |
27+
| Version | Version suffix | Kotlin | Coroutines | AndroidX Lifecycle |
28+
|---------------|---------------------|:-----------:|:----------:|:------------------:|
29+
| _latest_ | -kotlin-2.2.0-Beta1 | 2.2.0-Beta1 | 1.10.1 | 2.8.7 |
30+
| **_latest_** | **_no suffix_** | **2.1.21** | **1.10.1** | **2.8.7** |
31+
| 1.0.0-BETA-10 | _no suffix_ | 2.1.20 | 1.10.1 | 2.8.7 |
32+
| 1.0.0-BETA-9 | _no suffix_ | 2.1.10 | 1.10.1 | 2.8.7 |
33+
| 1.0.0-BETA-8 | _no suffix_ | 2.1.0 | 1.9.0 | 2.8.4 |
34+
| 1.0.0-BETA-7 | _no suffix_ | 2.0.21 | 1.9.0 | 2.8.4 |
35+
| 1.0.0-BETA-6 | _no suffix_ | 2.0.20 | 1.9.0 | 2.8.4 |
36+
| 1.0.0-BETA-4 | _no suffix_ | 2.0.10 | 1.8.1 | 2.8.4 |
37+
| 1.0.0-BETA-3 | _no suffix_ | 2.0.0 | 1.8.1 | 2.8.0 |
38+
| 1.0.0-BETA-2 | _no suffix_ | 1.9.24 | 1.8.1 | 2.8.0 |
3739

3840
## Kotlin
3941

@@ -46,7 +48,7 @@ kotlin {
4648
}
4749
commonMain {
4850
dependencies {
49-
api("com.rickclephas.kmp:kmp-observableviewmodel-core:1.0.0-BETA-10")
51+
api("com.rickclephas.kmp:kmp-observableviewmodel-core:1.0.0-BETA-11")
5052
}
5153
}
5254
}
@@ -153,7 +155,7 @@ After you have configured your `shared` Kotlin module and created a ViewModel it
153155
Start by adding the Swift package to your `Package.swift` file:
154156
```swift
155157
dependencies: [
156-
.package(url: "https://github.com/rickclephas/KMP-ObservableViewModel.git", from: "1.0.0-BETA-10")
158+
.package(url: "https://github.com/rickclephas/KMP-ObservableViewModel.git", from: "1.0.0-BETA-11")
157159
]
158160
```
159161

@@ -165,7 +167,7 @@ Or add it in Xcode by going to `File` > `Add Packages...` and providing the URL:
165167

166168
If you like you can also use CocoaPods instead of SPM:
167169
```ruby
168-
pod 'KMPObservableViewModelSwiftUI', '1.0.0-BETA-10'
170+
pod 'KMPObservableViewModelSwiftUI', '1.0.0-BETA-11'
169171
```
170172
</p>
171173
</details>

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-kotlin-2.2.0-Beta1"
16+
version = "1.0.0-BETA-11"
1717

1818
repositories {
1919
mavenCentral()

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)