Skip to content

Commit e8d6655

Browse files
authored
Merge pull request #240 from icerockdev/develop
Release 0.16.1
2 parents 8545a19 + 248262b commit e8d6655

File tree

4 files changed

+27
-25
lines changed

4 files changed

+27
-25
lines changed

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,25 @@ allprojects {
5050
project build.gradle
5151
```groovy
5252
dependencies {
53-
commonMainApi("dev.icerock.moko:mvvm-core:0.16.0") // only ViewModel, EventsDispatcher, Dispatchers.UI
54-
commonMainApi("dev.icerock.moko:mvvm-flow:0.16.0") // api mvvm-core, CFlow for native and binding extensions
55-
commonMainApi("dev.icerock.moko:mvvm-livedata:0.16.0") // api mvvm-core, LiveData and extensions
56-
commonMainApi("dev.icerock.moko:mvvm-state:0.16.0") // api mvvm-livedata, ResourceState class and extensions
57-
commonMainApi("dev.icerock.moko:mvvm-livedata-resources:0.16.0") // api mvvm-core, moko-resources, extensions for LiveData with moko-resources
58-
commonMainApi("dev.icerock.moko:mvvm-flow-resources:0.16.0") // api mvvm-core, moko-resources, extensions for Flow with moko-resources
53+
commonMainApi("dev.icerock.moko:mvvm-core:0.16.1") // only ViewModel, EventsDispatcher, Dispatchers.UI
54+
commonMainApi("dev.icerock.moko:mvvm-flow:0.16.1") // api mvvm-core, CFlow for native and binding extensions
55+
commonMainApi("dev.icerock.moko:mvvm-livedata:0.16.1") // api mvvm-core, LiveData and extensions
56+
commonMainApi("dev.icerock.moko:mvvm-state:0.16.1") // api mvvm-livedata, ResourceState class and extensions
57+
commonMainApi("dev.icerock.moko:mvvm-livedata-resources:0.16.1") // api mvvm-core, moko-resources, extensions for LiveData with moko-resources
58+
commonMainApi("dev.icerock.moko:mvvm-flow-resources:0.16.1") // api mvvm-core, moko-resources, extensions for Flow with moko-resources
5959
6060
// compose multiplatform
61-
commonMainApi("dev.icerock.moko:mvvm-compose:0.16.0") // api mvvm-core, getViewModel for Compose Multiplatfrom
62-
commonMainApi("dev.icerock.moko:mvvm-flow-compose:0.16.0") // api mvvm-flow, binding extensions for Compose Multiplatfrom
63-
commonMainApi("dev.icerock.moko:mvvm-livedata-compose:0.16.0") // api mvvm-livedata, binding extensions for Compose Multiplatfrom
64-
65-
androidMainApi("dev.icerock.moko:mvvm-livedata-material:0.16.0") // api mvvm-livedata, Material library android extensions
66-
androidMainApi("dev.icerock.moko:mvvm-livedata-glide:0.16.0") // api mvvm-livedata, Glide library android extensions
67-
androidMainApi("dev.icerock.moko:mvvm-livedata-swiperefresh:0.16.0") // api mvvm-livedata, SwipeRefreshLayout library android extensions
68-
androidMainApi("dev.icerock.moko:mvvm-databinding:0.16.0") // api mvvm-livedata, DataBinding support for Android
69-
androidMainApi("dev.icerock.moko:mvvm-viewbinding:0.16.0") // api mvvm-livedata, ViewBinding support for Android
61+
commonMainApi("dev.icerock.moko:mvvm-compose:0.16.1") // api mvvm-core, getViewModel for Compose Multiplatfrom
62+
commonMainApi("dev.icerock.moko:mvvm-flow-compose:0.16.1") // api mvvm-flow, binding extensions for Compose Multiplatfrom
63+
commonMainApi("dev.icerock.moko:mvvm-livedata-compose:0.16.1") // api mvvm-livedata, binding extensions for Compose Multiplatfrom
64+
65+
androidMainApi("dev.icerock.moko:mvvm-livedata-material:0.16.1") // api mvvm-livedata, Material library android extensions
66+
androidMainApi("dev.icerock.moko:mvvm-livedata-glide:0.16.1") // api mvvm-livedata, Glide library android extensions
67+
androidMainApi("dev.icerock.moko:mvvm-livedata-swiperefresh:0.16.1") // api mvvm-livedata, SwipeRefreshLayout library android extensions
68+
androidMainApi("dev.icerock.moko:mvvm-databinding:0.16.1") // api mvvm-livedata, DataBinding support for Android
69+
androidMainApi("dev.icerock.moko:mvvm-viewbinding:0.16.1") // api mvvm-livedata, ViewBinding support for Android
7070
71-
commonTestImplementation("dev.icerock.moko:mvvm-test:0.16.0") // test utilities
71+
commonTestImplementation("dev.icerock.moko:mvvm-test:0.16.1") // test utilities
7272
}
7373
```
7474

@@ -78,10 +78,10 @@ kotlin {
7878
// export correct artifact to use all classes of library directly from Swift
7979
targets.withType(org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget::class.java).all {
8080
binaries.withType(org.jetbrains.kotlin.gradle.plugin.mpp.Framework::class.java).all {
81-
export("dev.icerock.moko:mvvm-core:0.16.0")
82-
export("dev.icerock.moko:mvvm-livedata:0.16.0")
83-
export("dev.icerock.moko:mvvm-livedata-resources:0.16.0")
84-
export("dev.icerock.moko:mvvm-state:0.16.0")
81+
export("dev.icerock.moko:mvvm-core:0.16.1")
82+
export("dev.icerock.moko:mvvm-livedata:0.16.1")
83+
export("dev.icerock.moko:mvvm-livedata-resources:0.16.1")
84+
export("dev.icerock.moko:mvvm-state:0.16.1")
8585
}
8686
}
8787
}
@@ -97,7 +97,7 @@ generation enabled. All `LiveData` to `UIView` bindings is extensions for UI ele
9797
To use MOKO MVVM with SwiftUI set name of your kotlin framework to `MultiPlatformLibrary` and add
9898
dependency to CocoaPods:
9999
```ruby
100-
pod 'mokoMvvmFlowSwiftUI', :podspec => 'https://raw.githubusercontent.com/icerockdev/moko-mvvm/release/0.16.0/mokoMvvmFlowSwiftUI.podspec'
100+
pod 'mokoMvvmFlowSwiftUI', :podspec => 'https://raw.githubusercontent.com/icerockdev/moko-mvvm/release/0.16.1/mokoMvvmFlowSwiftUI.podspec'
101101
```
102102
required export of `mvvm-core` and `mvvm-flow`.
103103

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ androidLifecycleVersion = "2.6.1"
44
coroutinesVersion = "1.6.4"
55
mokoResourcesVersion = "0.21.1"
66
mokoTestVersion = "0.6.1"
7-
mokoMvvmVersion = "0.16.0"
7+
mokoMvvmVersion = "0.16.1"
88
mokoKSwiftVersion = "0.6.1"
99
composeVersion = "1.4.0"
1010
composeJetBrainsVersion = "1.3.1"

mokoMvvmFlowSwiftUI.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 = 'mokoMvvmFlowSwiftUI'
3-
s.version = '0.16.0'
3+
s.version = '0.16.1'
44
s.summary = 'MOKO MVVM SwiftUI additions for Flow'
55
s.description = 'some description here'
66
s.homepage = 'localhost'

mvvm-flow/apple/xcode/mokoMvvmFlowSwiftUI/CFlowExt.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ private class CFlowSubscription<Output: AnyObject, S: Subscriber>: Subscription
3131

3232
init(flow: CFlow<Output>, subscriber: S) {
3333
self.subscriber = subscriber
34-
self.disposable = flow.subscribe { value in
35-
let _ = subscriber.receive(value!)
34+
// TRICKY: `as! CFlow<AnyObject>` cast here, and `as! Output` cast below, combine
35+
// to work around https://github.com/apple/swift/issues/65331
36+
self.disposable = (flow as! CFlow<AnyObject>).subscribe { value in
37+
let _ = subscriber.receive(value as! Output)
3638
}
3739
}
3840

0 commit comments

Comments
 (0)