Skip to content

Commit

Permalink
Merge pull request #240 from icerockdev/develop
Browse files Browse the repository at this point in the history
Release 0.16.1
  • Loading branch information
Alex009 committed Apr 21, 2023
2 parents 8545a19 + 248262b commit e8d6655
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 25 deletions.
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,25 @@ allprojects {
project build.gradle
```groovy
dependencies {
commonMainApi("dev.icerock.moko:mvvm-core:0.16.0") // only ViewModel, EventsDispatcher, Dispatchers.UI
commonMainApi("dev.icerock.moko:mvvm-flow:0.16.0") // api mvvm-core, CFlow for native and binding extensions
commonMainApi("dev.icerock.moko:mvvm-livedata:0.16.0") // api mvvm-core, LiveData and extensions
commonMainApi("dev.icerock.moko:mvvm-state:0.16.0") // api mvvm-livedata, ResourceState class and extensions
commonMainApi("dev.icerock.moko:mvvm-livedata-resources:0.16.0") // api mvvm-core, moko-resources, extensions for LiveData with moko-resources
commonMainApi("dev.icerock.moko:mvvm-flow-resources:0.16.0") // api mvvm-core, moko-resources, extensions for Flow with moko-resources
commonMainApi("dev.icerock.moko:mvvm-core:0.16.1") // only ViewModel, EventsDispatcher, Dispatchers.UI
commonMainApi("dev.icerock.moko:mvvm-flow:0.16.1") // api mvvm-core, CFlow for native and binding extensions
commonMainApi("dev.icerock.moko:mvvm-livedata:0.16.1") // api mvvm-core, LiveData and extensions
commonMainApi("dev.icerock.moko:mvvm-state:0.16.1") // api mvvm-livedata, ResourceState class and extensions
commonMainApi("dev.icerock.moko:mvvm-livedata-resources:0.16.1") // api mvvm-core, moko-resources, extensions for LiveData with moko-resources
commonMainApi("dev.icerock.moko:mvvm-flow-resources:0.16.1") // api mvvm-core, moko-resources, extensions for Flow with moko-resources
// compose multiplatform
commonMainApi("dev.icerock.moko:mvvm-compose:0.16.0") // api mvvm-core, getViewModel for Compose Multiplatfrom
commonMainApi("dev.icerock.moko:mvvm-flow-compose:0.16.0") // api mvvm-flow, binding extensions for Compose Multiplatfrom
commonMainApi("dev.icerock.moko:mvvm-livedata-compose:0.16.0") // api mvvm-livedata, binding extensions for Compose Multiplatfrom
androidMainApi("dev.icerock.moko:mvvm-livedata-material:0.16.0") // api mvvm-livedata, Material library android extensions
androidMainApi("dev.icerock.moko:mvvm-livedata-glide:0.16.0") // api mvvm-livedata, Glide library android extensions
androidMainApi("dev.icerock.moko:mvvm-livedata-swiperefresh:0.16.0") // api mvvm-livedata, SwipeRefreshLayout library android extensions
androidMainApi("dev.icerock.moko:mvvm-databinding:0.16.0") // api mvvm-livedata, DataBinding support for Android
androidMainApi("dev.icerock.moko:mvvm-viewbinding:0.16.0") // api mvvm-livedata, ViewBinding support for Android
commonMainApi("dev.icerock.moko:mvvm-compose:0.16.1") // api mvvm-core, getViewModel for Compose Multiplatfrom
commonMainApi("dev.icerock.moko:mvvm-flow-compose:0.16.1") // api mvvm-flow, binding extensions for Compose Multiplatfrom
commonMainApi("dev.icerock.moko:mvvm-livedata-compose:0.16.1") // api mvvm-livedata, binding extensions for Compose Multiplatfrom
androidMainApi("dev.icerock.moko:mvvm-livedata-material:0.16.1") // api mvvm-livedata, Material library android extensions
androidMainApi("dev.icerock.moko:mvvm-livedata-glide:0.16.1") // api mvvm-livedata, Glide library android extensions
androidMainApi("dev.icerock.moko:mvvm-livedata-swiperefresh:0.16.1") // api mvvm-livedata, SwipeRefreshLayout library android extensions
androidMainApi("dev.icerock.moko:mvvm-databinding:0.16.1") // api mvvm-livedata, DataBinding support for Android
androidMainApi("dev.icerock.moko:mvvm-viewbinding:0.16.1") // api mvvm-livedata, ViewBinding support for Android
commonTestImplementation("dev.icerock.moko:mvvm-test:0.16.0") // test utilities
commonTestImplementation("dev.icerock.moko:mvvm-test:0.16.1") // test utilities
}
```

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

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ androidLifecycleVersion = "2.6.1"
coroutinesVersion = "1.6.4"
mokoResourcesVersion = "0.21.1"
mokoTestVersion = "0.6.1"
mokoMvvmVersion = "0.16.0"
mokoMvvmVersion = "0.16.1"
mokoKSwiftVersion = "0.6.1"
composeVersion = "1.4.0"
composeJetBrainsVersion = "1.3.1"
Expand Down
2 changes: 1 addition & 1 deletion mokoMvvmFlowSwiftUI.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'mokoMvvmFlowSwiftUI'
s.version = '0.16.0'
s.version = '0.16.1'
s.summary = 'MOKO MVVM SwiftUI additions for Flow'
s.description = 'some description here'
s.homepage = 'localhost'
Expand Down
6 changes: 4 additions & 2 deletions mvvm-flow/apple/xcode/mokoMvvmFlowSwiftUI/CFlowExt.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ private class CFlowSubscription<Output: AnyObject, S: Subscriber>: Subscription

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

Expand Down

0 comments on commit e8d6655

Please sign in to comment.