Merge pull request #99 from joreilly/kotlin_1_6_10

Kotlin 1.6.10, K/N new memory model, use Swift 5.5 concurrency apis
This commit is contained in:
John O'Reilly 2021-12-17 23:22:18 +00:00 committed by GitHub
commit e78d57702c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
64 changed files with 1101 additions and 1065 deletions

View file

@ -22,7 +22,7 @@ android {
}
composeOptions {
kotlinCompilerExtensionVersion = Versions.compose
kotlinCompilerExtensionVersion = Versions.composeCompiler
}
buildTypes {
@ -68,6 +68,7 @@ dependencies {
with(Deps.Compose) {
implementation(compiler)
implementation(ui)
implementation(uiGraphics)
implementation(foundationLayout)

View file

@ -99,7 +99,7 @@ fun MainLayout() {
AnimatedNavHost(navController, startDestination = Screen.PersonList.title) {
composable(
route = Screen.PersonList.title,
exitTransition = { _, _ ->
exitTransition = { _, target ->
slideOutHorizontally() +
fadeOut(animationSpec = tween(1000))
},

View file

@ -16,7 +16,7 @@ dependencies {
with(Deps.Ktor) {
implementation(serverCore)
implementation(serverNetty)
implementation(serialization)
//implementation(serialization)
implementation(websockets)
}

View file

@ -20,7 +20,7 @@ buildscript {
classpath(shadow)
classpath(kotlinter)
classpath(gradleVersionsPlugin)
val kmpNativeCoroutinesVersion = if (kotlinVersion == "1.6.0") "0.9.0" else "0.8.0"
val kmpNativeCoroutinesVersion = if (kotlinVersion == "1.6.10") "0.10.0-new-mm" else "0.8.0"
classpath("com.rickclephas.kmp:kmp-nativecoroutines-gradle-plugin:$kmpNativeCoroutinesVersion")
}
}

View file

@ -3,15 +3,16 @@ object Versions {
const val androidCompileSdk = 31
const val androidTargetSdk = androidCompileSdk
const val kotlinCoroutines = "1.5.2-native-mt"
const val kotlinCoroutines = "1.6.0-RC3"
const val koin = "3.1.4"
const val ktor = "1.6.5"
const val kotlinxSerialization = "1.3.0"
const val ktor = "2.0.0-eap-278"
const val kotlinxSerialization = "1.3.1"
const val kotlinxHtmlJs = "0.7.3"
const val compose = "1.0.5"
const val wearCompose = "1.0.0-alpha10"
const val navCompose = "2.4.0-beta02"
const val compose = "1.1.0-rc01"
const val composeCompiler = "1.1.0-rc02"
const val wearCompose = "1.0.0-alpha13"
const val navCompose = "2.4.0-rc01"
const val accompanist = "0.21.0-beta"
const val junit = "4.12"
@ -81,6 +82,7 @@ object Deps {
}
object Compose {
const val compiler = "androidx.compose.compiler:compiler:${Versions.composeCompiler}"
const val ui = "androidx.compose.ui:ui:${Versions.compose}"
const val uiGraphics = "androidx.compose.ui:ui-graphics:${Versions.compose}"
const val uiTooling = "androidx.compose.ui:ui-tooling:${Versions.compose}"
@ -107,7 +109,10 @@ object Deps {
object Ktor {
const val serverCore = "io.ktor:ktor-server-core:${Versions.ktor}"
const val serverNetty = "io.ktor:ktor-server-netty:${Versions.ktor}"
const val serialization = "io.ktor:ktor-serialization:${Versions.ktor}"
//const val serialization = "io.ktor:ktor-serialization:${Versions.ktor}"
const val contentNegotiation = "io.ktor:ktor-client-content-negotiation:${Versions.ktor}"
const val json = "io.ktor:ktor-serialization-kotlinx-json:${Versions.ktor}"
const val websockets = "io.ktor:ktor-websockets:${Versions.ktor}"
const val clientCore = "io.ktor:ktor-client-core:${Versions.ktor}"
const val clientJson = "io.ktor:ktor-client-json:${Versions.ktor}"

View file

@ -82,7 +82,8 @@ kotlin {
implementation(clientCore)
implementation(clientJson)
implementation(clientLogging)
implementation(clientSerialization)
implementation(contentNegotiation)
implementation(json)
}
with(Deps.Kotlinx) {

View file

@ -1,11 +1,11 @@
Pod::Spec.new do |spec|
spec.name = 'common'
spec.version = '1.0'
spec.homepage = 'https://github.com/joreilly/PeopleInSpace'
spec.homepage = ''
spec.source = { :git => "Not Published", :tag => "Cocoapods/#{spec.name}/#{spec.version}" }
spec.authors = ''
spec.license = ''
spec.summary = 'PeopleInSpace'
spec.summary = ''
spec.vendored_frameworks = "build/cocoapods/framework/common.framework"
spec.libraries = "c++"
@ -33,13 +33,9 @@ Pod::Spec.new do |spec|
set -ev
REPO_ROOT="$PODS_TARGET_SRCROOT"
"$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \
-PkotlinVersion="1.6.0" \
-Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \
-Pkotlin.native.cocoapods.archs="$ARCHS" \
-Pkotlin.native.cocoapods.configuration=$CONFIGURATION \
-Pkotlin.native.cocoapods.cflags="$OTHER_CFLAGS" \
-Pkotlin.native.cocoapods.paths.headers="$HEADER_SEARCH_PATHS" \
-Pkotlin.native.cocoapods.paths.frameworks="$FRAMEWORK_SEARCH_PATHS"
-Pkotlin.native.cocoapods.configuration=$CONFIGURATION
SCRIPT
}
]

View file

@ -1,11 +1,13 @@
package com.surrus.common.repository
import co.touchlab.kermit.Logger
import com.squareup.sqldelight.android.AndroidSqliteDriver
import com.surrus.common.di.PeopleInSpaceDatabaseWrapper
import com.surrus.peopleinspace.db.PeopleInSpaceDatabase
import io.ktor.client.engine.android.*
import org.koin.dsl.module
actual fun platformModule() = module {
single {
val driver =
@ -13,4 +15,5 @@ actual fun platformModule() = module {
PeopleInSpaceDatabaseWrapper(PeopleInSpaceDatabase(driver))
}
single { Android.create() }
}

View file

@ -5,9 +5,10 @@ import com.surrus.common.repository.PeopleInSpaceRepository
import com.surrus.common.repository.PeopleInSpaceRepositoryInterface
import com.surrus.common.repository.platformModule
import io.ktor.client.*
import io.ktor.client.features.json.*
import io.ktor.client.features.json.serializer.*
import io.ktor.client.features.logging.*
import io.ktor.client.engine.*
import io.ktor.client.plugins.*
import io.ktor.client.plugins.logging.*
import io.ktor.serialization.kotlinx.json.*
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
@ -27,7 +28,7 @@ fun initKoin() = initKoin(enableNetworkLogs = false) {}
fun commonModule(enableNetworkLogs: Boolean) = module {
single { createJson() }
single { createHttpClient(get(), enableNetworkLogs = enableNetworkLogs) }
single { createHttpClient(get(), get(), enableNetworkLogs = enableNetworkLogs) }
single { CoroutineScope(Dispatchers.Default + SupervisorJob() ) }
@ -38,9 +39,10 @@ fun commonModule(enableNetworkLogs: Boolean) = module {
fun createJson() = Json { isLenient = true; ignoreUnknownKeys = true }
fun createHttpClient(json: Json, enableNetworkLogs: Boolean) = HttpClient {
install(JsonFeature) {
serializer = KotlinxSerializer(json)
fun createHttpClient(httpClientEngine: HttpClientEngine, json: Json, enableNetworkLogs: Boolean) = HttpClient(httpClientEngine) {
install(ContentNegotiation) {
json()
}
if (enableNetworkLogs) {
install(Logging) {

View file

@ -1,6 +1,7 @@
package com.surrus.common.remote
import io.ktor.client.*
import io.ktor.client.call.*
import io.ktor.client.request.*
import kotlinx.serialization.Serializable
import org.koin.core.component.KoinComponent
@ -21,6 +22,6 @@ class PeopleInSpaceApi(
private val client: HttpClient,
var baseUrl: String = "https://people-in-space-proxy.ew.r.appspot.com",
) : KoinComponent {
suspend fun fetchPeople() = client.get<AstroResult>("$baseUrl/astros.json")
suspend fun fetchISSPosition() = client.get<IssResponse>("$baseUrl/iss-now.json")
suspend fun fetchPeople() = client.get("$baseUrl/astros.json").body<AstroResult>()
suspend fun fetchISSPosition() = client.get("$baseUrl/iss-now.json").body<IssResponse>()
}

View file

@ -3,11 +3,14 @@ package com.surrus.common.repository
import com.squareup.sqldelight.drivers.native.NativeSqliteDriver
import com.surrus.common.di.PeopleInSpaceDatabaseWrapper
import com.surrus.peopleinspace.db.PeopleInSpaceDatabase
import io.ktor.client.engine.ios.*
import org.koin.dsl.module
actual fun platformModule() = module {
single {
val driver = NativeSqliteDriver(PeopleInSpaceDatabase.Schema, "peopleinspace.db")
PeopleInSpaceDatabaseWrapper(PeopleInSpaceDatabase(driver))
}
single { Ios.create() }
}

View file

@ -1,10 +1,12 @@
package com.surrus.common.repository
import com.surrus.common.di.PeopleInSpaceDatabaseWrapper
import io.ktor.client.engine.js.*
import org.koin.dsl.module
actual fun platformModule() = module {
single {
PeopleInSpaceDatabaseWrapper(null)
}
single { Js.create() }
}

View file

@ -3,6 +3,7 @@ package com.surrus.common.repository
import com.squareup.sqldelight.sqlite.driver.JdbcSqliteDriver
import com.surrus.common.di.PeopleInSpaceDatabaseWrapper
import com.surrus.peopleinspace.db.PeopleInSpaceDatabase
import io.ktor.client.engine.java.*
import org.koin.dsl.module
actual fun platformModule() = module {
@ -11,4 +12,5 @@ actual fun platformModule() = module {
.also { PeopleInSpaceDatabase.Schema.create(it) }
PeopleInSpaceDatabaseWrapper(PeopleInSpaceDatabase(driver))
}
single { Java.create() }
}

View file

@ -3,6 +3,7 @@ package com.surrus.common.repository
import com.squareup.sqldelight.drivers.native.NativeSqliteDriver
import com.surrus.common.di.PeopleInSpaceDatabaseWrapper
import com.surrus.peopleinspace.db.PeopleInSpaceDatabase
import io.ktor.client.engine.ios.*
import org.koin.dsl.module
actual fun platformModule() = module {
@ -10,4 +11,5 @@ actual fun platformModule() = module {
val driver = NativeSqliteDriver(PeopleInSpaceDatabase.Schema, "peopleinspace.db")
PeopleInSpaceDatabaseWrapper(PeopleInSpaceDatabase(driver))
}
single { Ios.create() }
}

View file

@ -3,6 +3,7 @@ package com.surrus.common.repository
import com.squareup.sqldelight.drivers.native.NativeSqliteDriver
import com.surrus.common.di.PeopleInSpaceDatabaseWrapper
import com.surrus.peopleinspace.db.PeopleInSpaceDatabase
import io.ktor.client.engine.ios.*
import org.koin.dsl.module
actual fun platformModule() = module {
@ -10,4 +11,5 @@ actual fun platformModule() = module {
val driver = NativeSqliteDriver(PeopleInSpaceDatabase.Schema, "peopleinspace.db")
PeopleInSpaceDatabaseWrapper(PeopleInSpaceDatabase(driver))
}
single { Ios.create() }
}

View file

@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm")
id("org.jetbrains.compose") version "1.0.0"
id("org.jetbrains.compose") version "1.0.1-rc2"
application
}

View file

@ -1,6 +1,6 @@
plugins {
kotlin("multiplatform")
id("org.jetbrains.compose") version "1.0.0"
id("org.jetbrains.compose") version "1.0.1-rc2"
}
version = "1.0"

View file

@ -24,7 +24,7 @@ kotlin.code.style=official
xcodeproj=./ios/PeopleInSpaceSwiftUI
# Kotlin/Native clients can override this through updating common.podspec
kotlinVersion=1.5.31
kotlinVersion=1.6.10
#kotlin.native.binary.memoryModel=experimental
#kotlin.native.binary.freezing=disabled
kotlin.native.binary.memoryModel=experimental
kotlin.native.binary.freezing=disabled

View file

@ -7,12 +7,12 @@
<key>PeopleInSpaceSwiftUI.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>5</integer>
<integer>6</integer>
</dict>
<key>PeopleInSpaceWidgetExtension.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>3</integer>
<integer>5</integer>
</dict>
</dict>
</dict>

View file

@ -1,41 +1,48 @@
import Foundation
import Combine
import common
import KMPNativeCoroutinesCombine
import KMPNativeCoroutinesAsync
@MainActor
class PeopleInSpaceViewModel: ObservableObject {
@Published var people = [Assignment]()
@Published var issPosition = IssPosition(latitude: 0, longitude: 0)
private var positionCancellable: AnyCancellable?
private var peopleCancellable: AnyCancellable?
private var fetchPeopleTask: Task<(), Never>? = nil
private var pollISSPositionTask: Task<(), Never>? = nil
private let repository: PeopleInSpaceRepository
init(repository: PeopleInSpaceRepository) {
self.repository = repository
positionCancellable = createPublisher(for: repository.pollISSPositionNative())
.receive(on: DispatchQueue.main)
.sink(receiveCompletion: { completion in
debugPrint(completion)
}, receiveValue: { [weak self] value in
self?.issPosition = value
})
pollISSPositionTask = Task {
do {
let stream = asyncStream(for: repository.pollISSPositionNative())
for try await data in stream {
self.issPosition = data
}
} catch {
print("Failed with error: \(error)")
}
}
}
func startObservingPeopleUpdates() {
peopleCancellable = createPublisher(for: repository.fetchPeopleAsFlowNative())
.receive(on: DispatchQueue.main)
.sink(receiveCompletion: { completion in
debugPrint(completion)
}, receiveValue: { [weak self] value in
self?.people = value
})
fetchPeopleTask = Task {
do {
let stream = asyncStream(for: repository.fetchPeopleAsFlowNative())
for try await data in stream {
self.people = data
}
} catch {
print("Failed with error: \(error)")
}
}
}
func stopObservingPeopleUpdates() {
peopleCancellable?.cancel()
fetchPeopleTask?.cancel()
}
}

View file

@ -2,7 +2,7 @@ import WidgetKit
import SwiftUI
import Combine
import common
import KMPNativeCoroutinesCombine
import KMPNativeCoroutinesAsync
final class Provider: TimelineProvider {
@ -24,15 +24,15 @@ final class Provider: TimelineProvider {
}
func getTimeline(in context: Context, completion: @escaping (Timeline<Entry>) -> ()) {
timelineCancellable = createFuture(for: repository.fetchPeopleNative())
.map { data in
let entry = PeopleInSpaceListEntry(date: Date(), peopleList: data)
return Timeline(entries: [entry], policy: .atEnd)
}
.receive(on: DispatchQueue.main)
.sink(receiveCompletion: { completion in
debugPrint(completion)
}, receiveValue: completion)
// timelineCancellable = createFuture(for: repository.fetchPeopleNative())
// .map { data in
// let entry = PeopleInSpaceListEntry(date: Date(), peopleList: data)
// return Timeline(entries: [entry], policy: .atEnd)
// }
// .receive(on: DispatchQueue.main)
// .sink(receiveCompletion: { completion in
// debugPrint(completion)
// }, receiveValue: completion)
}
}

View file

@ -1,10 +1,10 @@
target 'PeopleInSpaceSwiftUI' do
pod 'common', :path => '../../common'
pod 'KMPNativeCoroutinesCombine', '0.9.0'
pod 'KMPNativeCoroutinesAsync', '0.10.0'
end
target 'PeopleInSpaceWidgetExtension' do
pod 'common', :path => '../../common'
pod 'KMPNativeCoroutinesCombine', '0.9.0'
pod 'KMPNativeCoroutinesAsync', '0.10.0'
end

View file

@ -1,16 +1,16 @@
PODS:
- common (1.0)
- KMPNativeCoroutinesCombine (0.9.0):
- KMPNativeCoroutinesCore (= 0.9.0)
- KMPNativeCoroutinesCore (0.9.0)
- KMPNativeCoroutinesAsync (0.10.0):
- KMPNativeCoroutinesCore (= 0.10.0)
- KMPNativeCoroutinesCore (0.10.0)
DEPENDENCIES:
- common (from `../../common`)
- KMPNativeCoroutinesCombine (= 0.9.0)
- KMPNativeCoroutinesAsync (= 0.10.0)
SPEC REPOS:
trunk:
- KMPNativeCoroutinesCombine
- KMPNativeCoroutinesAsync
- KMPNativeCoroutinesCore
EXTERNAL SOURCES:
@ -18,10 +18,10 @@ EXTERNAL SOURCES:
:path: "../../common"
SPEC CHECKSUMS:
common: 7e8d176d3cfcbbb6a4901dbf0bd759685bf4dd86
KMPNativeCoroutinesCombine: 3a3c39852cf9fcb764b97ac604bd1cfacdd720c7
KMPNativeCoroutinesCore: a9abca92a371f0c1af62bfb06c94c943ad515114
common: 6bdd4aad82fe8e27657799269c3615cf5e9cd389
KMPNativeCoroutinesAsync: 66512d0bf4933d0b160416795284beb8ecf089b8
KMPNativeCoroutinesCore: 2e2573a75f27178d4cbd7be385f0f0a54416a47a
PODFILE CHECKSUM: e35181d90508d66984e05816593afec34fcc1d9a
PODFILE CHECKSUM: c82371f217f8782254550b881ac2b3b5acdbe1bb
COCOAPODS: 1.9.3
COCOAPODS: 1.11.2

View file

@ -0,0 +1 @@
../../../Target Support Files/KMPNativeCoroutinesAsync/KMPNativeCoroutinesAsync-umbrella.h

View file

@ -0,0 +1 @@
../../../Target Support Files/KMPNativeCoroutinesAsync/KMPNativeCoroutinesAsync.modulemap

View file

@ -1 +0,0 @@
../../../Target Support Files/KMPNativeCoroutinesCombine/KMPNativeCoroutinesCombine-umbrella.h

View file

@ -1 +0,0 @@
../../../Target Support Files/KMPNativeCoroutinesCombine/KMPNativeCoroutinesCombine.modulemap

View file

@ -0,0 +1,69 @@
//
// AsyncFunction.swift
// KMPNativeCoroutinesAsync
//
// Created by Rick Clephas on 13/06/2021.
//
import KMPNativeCoroutinesCore
/// Wraps the `NativeSuspend` in an async function.
/// - Parameter nativeSuspend: The native suspend function to await.
/// - Returns: The result from the `nativeSuspend`.
/// - Throws: Errors thrown by the `nativeSuspend`.
public func asyncFunction<Result, Failure: Error, Unit>(for nativeSuspend: @escaping NativeSuspend<Result, Failure, Unit>) async throws -> Result {
let asyncFunctionActor = AsyncFunctionActor<Result, Unit>()
return try await withTaskCancellationHandler {
Task { await asyncFunctionActor.cancel() }
} operation: {
try await withUnsafeThrowingContinuation { continuation in
Task {
await asyncFunctionActor.setContinuation(continuation)
let nativeCancellable = nativeSuspend({ output, unit in
Task { await asyncFunctionActor.continueWith(result: output) }
return unit
}, { error, unit in
Task { await asyncFunctionActor.continueWith(error: error) }
return unit
})
await asyncFunctionActor.setNativeCancellable(nativeCancellable)
}
}
}
}
internal actor AsyncFunctionActor<Result, Unit> {
private var isCancelled = false
private var nativeCancellable: NativeCancellable<Unit>? = nil
func setNativeCancellable(_ nativeCancellable: @escaping NativeCancellable<Unit>) {
guard !isCancelled else {
_ = nativeCancellable()
return
}
self.nativeCancellable = nativeCancellable
}
func cancel() {
isCancelled = true
_ = nativeCancellable?()
nativeCancellable = nil
}
private var continuation: UnsafeContinuation<Result, Error>? = nil
func setContinuation(_ continuation: UnsafeContinuation<Result, Error>) {
self.continuation = continuation
}
func continueWith(result: Result) {
continuation?.resume(returning: result)
continuation = nil
}
func continueWith(error: Error) {
continuation?.resume(throwing: error)
continuation = nil
}
}

View file

@ -0,0 +1,19 @@
//
// AsyncResult.swift
// KMPNativeCoroutinesAsync
//
// Created by Rick Clephas on 28/06/2021.
//
import KMPNativeCoroutinesCore
/// Awaits the `NativeSuspend` and returns the result.
/// - Parameter nativeSuspend: The native suspend function to await.
/// - Returns: The `Result` from the `nativeSuspend`.
public func asyncResult<Output, Failure: Error, Unit>(for nativeSuspend: @escaping NativeSuspend<Output, Failure, Unit>) async -> Result<Output, Error> {
do {
return .success(try await asyncFunction(for: nativeSuspend))
} catch {
return .failure(error)
}
}

View file

@ -0,0 +1,54 @@
//
// AsyncStream.swift
// AsyncStream
//
// Created by Rick Clephas on 15/07/2021.
//
import KMPNativeCoroutinesCore
/// Wraps the `NativeFlow` in an `AsyncThrowingStream`.
/// - Parameter nativeFlow: The native flow to collect.
/// - Returns: An stream that yields the collected values.
public func asyncStream<Output, Failure: Error, Unit>(for nativeFlow: @escaping NativeFlow<Output, Failure, Unit>) -> AsyncThrowingStream<Output, Error> {
let asyncStreamActor = AsyncStreamActor<Output, Unit>()
return AsyncThrowingStream { continuation in
continuation.onTermination = { @Sendable _ in
Task { await asyncStreamActor.cancel() }
}
Task {
let nativeCancellable = nativeFlow({ item, unit in
continuation.yield(item)
return unit
}, { error, unit in
if let error = error {
continuation.finish(throwing: error)
} else {
continuation.finish(throwing: nil)
}
return unit
})
await asyncStreamActor.setNativeCancellable(nativeCancellable)
}
}
}
internal actor AsyncStreamActor<Output, Unit> {
private var isCancelled = false
private var nativeCancellable: NativeCancellable<Unit>? = nil
func setNativeCancellable(_ nativeCancellable: @escaping NativeCancellable<Unit>) {
guard !isCancelled else {
_ = nativeCancellable()
return
}
self.nativeCancellable = nativeCancellable
}
func cancel() {
isCancelled = true
_ = nativeCancellable?()
nativeCancellable = nil
}
}

View file

@ -11,37 +11,37 @@ Kotlin suspend functions are exposed to Swift as functions with a completion han
This allows you to easily use them from your Swift code, but it doesn't support cancellation.
> While Swift 5.5 brings async functions to Swift, it doesn't solve this issue.
> For interoperability with ObjC all function with a completion handler can be called like an async function.
> For interoperability with ObjC all functions with a completion handler can be called like an async function.
> This means starting with Swift 5.5 your Kotlin suspend functions will look like Swift async functions.
> But that's just syntactic sugar, so there's still no cancellation support.
Besides cancellation support, ObjC doesn't support generics on protocols.
So all the `Flow` interfaces lose their generic value type which make them hard to use.
This library solves both of these limitations :smile: .
This library solves both of these limitations 😄.
## Compatibility
As of version `0.9.0` the library uses Kotlin version `1.6.0`.
As of version `0.10.0` the library uses Kotlin version `1.6.10`.
Compatibility versions for older and early access Kotlin versions are also available:
|Version|Version suffix|Kotlin|Coroutines|
|---|---|:---:|:---:|
|_latest_|-new-mm|1.6.0|1.5.1-new-mm-dev2|
|**_latest_**|**_no suffix_**|**1.6.0**|**1.5.2-native-mt**|
|0.8.0|_no suffix_|1.5.30|1.5.2-native-mt|
|0.8.0|-kotlin-1.5.20|1.5.20|1.5.0-native-mt|
| Version | Version suffix | Kotlin | Coroutines |
|--------------|-----------------|:----------:|:-------------------:|
| _latest_ | -new-mm | 1.6.10 | 1.6.0-RC3 |
| **_latest_** | **_no suffix_** | **1.6.10** | **1.5.2-native-mt** |
| _latest_ | -kotlin-1.6.0 | 1.6.0 | 1.5.2-native-mt |
| 0.9.0 | -new-mm-3 | 1.6.0 | 1.6.0-RC2 |
| 0.8.0 | _no suffix_ | 1.5.30 | 1.5.2-native-mt |
| 0.8.0 | -kotlin-1.5.20 | 1.5.20 | 1.5.0-native-mt |
You can choose from a couple of Swift implementations.
Depending on the implementation you can support as low as iOS 9, macOS 10.9, tvOS 9 and watchOS 3:
|Implementation|Swift|iOS|macOS|tvOS|watchOS|
|---|:---:|:---:|:---:|:---:|:---:|
|RxSwift|5.0|9.0|10.9|9.0|3.0|
|Combine|5.0|13.0|10.15|13.0|6.0|
|Async :construction:|5.5|13.0|10.15|13.0|6.0|
> :construction: : the Async implementation requires Xcode 13.2 which is currently in beta!
| Implementation | Swift | iOS | macOS | tvOS | watchOS |
|----------------|:-----:|:----:|:-----:|:----:|:-------:|
| Async | 5.5 | 13.0 | 10.15 | 13.0 | 6.0 |
| Combine | 5.0 | 13.0 | 10.15 | 13.0 | 6.0 |
| RxSwift | 5.0 | 9.0 | 10.9 | 9.0 | 3.0 |
## Installation
@ -62,23 +62,9 @@ plugins {
}
```
### Swift (CocoaPods)
Now for Swift you can choose from a couple of implementations.
Add one or more of the following libraries to your `Podfile`:
```ruby
pod 'KMPNativeCoroutinesCombine' # Combine implementation
pod 'KMPNativeCoroutinesRxSwift' # RxSwift implementation
pod 'KMPNativeCoroutinesAsync' # Swift 5.5 Async/Await implementation
```
### Swift (Swift Package Manager)
All Swift implementations are also available via the Swift Package Manager.
> **NOTE:** `KMPNativeCoroutinesAsync` requires Xcode 13.2 which is currently in beta.
> To add the async implementation you should add the `-swift-async-await` suffix to the version.
All Swift implementations are also available via the Swift Package Manager.
Just add it to your `Package.swift` file:
```swift
dependencies: [
@ -86,9 +72,19 @@ dependencies: [
]
```
Or add it in Xcode by going to `File` > `Add Packages...` and providing the URL:
Or add it in Xcode by going to `File` > `Add Packages...` and providing the URL:
`https://github.com/rickclephas/KMP-NativeCoroutines.git`.
### Swift (CocoaPods)
Now for Swift you can choose from a couple of implementations.
Add one or more of the following libraries to your `Podfile`:
```ruby
pod 'KMPNativeCoroutinesAsync' # Swift 5.5 Async/Await implementation
pod 'KMPNativeCoroutinesCombine' # Combine implementation
pod 'KMPNativeCoroutinesRxSwift' # RxSwift implementation
```
## Usage
Using your Kotlin Coroutines code from Swift is almost as easy as calling the Kotlin code.
@ -96,7 +92,7 @@ Just use the wrapper functions in Swift to get Observables, Publishers, AsyncStr
### Kotlin
The plugin will automagically generate the necessary code for you! :crystal_ball:
The plugin will automagically generate the necessary code for you! 🔮
Your `Flow` properties/functions get a `Native` version:
```kotlin
@ -123,7 +119,6 @@ val timeNativeReplayCache
The plugin also generates `Native` versions for all your suspend functions:
```kotlin
class RandomLettersGenerator {
// Somewhere in your Kotlin code you define a suspend function
suspend fun getRandomLetters(): String {
@ -178,6 +173,94 @@ val ignoredFlowProperty: Flow<Int>
suspend fun ignoredSuspendFunction() { }
```
### Swift 5.5 Async/Await
The Async implementation provides some functions to get async Swift functions and `AsyncStream`s.
Use the `asyncFunction(for:)` function to get an async function that can be awaited:
```swift
let handle = Task {
do {
let letters = try await asyncFunction(for: randomLettersGenerator.getRandomLettersNative())
print("Got random letters: \(letters)")
} catch {
print("Failed with error: \(error)")
}
}
// To cancel the suspend function just cancel the async task
handle.cancel()
```
or if you don't like these do-catches you can use the `asyncResult(for:)` function:
```swift
let result = await asyncResult(for: randomLettersGenerator.getRandomLettersNative())
if case let .success(letters) = result {
print("Got random letters: \(letters)")
}
```
For `Flow`s there is the `asyncStream(for:)` function to get an `AsyncStream`:
```swift
let handle = Task {
do {
let stream = asyncStream(for: randomLettersGenerator.getRandomLettersFlowNative())
for try await letters in stream {
print("Got random letters: \(letters)")
}
} catch {
print("Failed with error: \(error)")
}
}
// To cancel the flow (collection) just cancel the async task
handle.cancel()
```
### Combine
The Combine implementation provides a couple functions to get an `AnyPublisher` for your Coroutines code.
For your `Flow`s use the `createPublisher(for:)` function:
```swift
// Create an AnyPublisher for your flow
let publisher = createPublisher(for: clock.timeNative)
// Now use this publisher as you would any other
let cancellable = publisher.sink { completion in
print("Received completion: \(completion)")
} receiveValue: { value in
print("Received value: \(value)")
}
// To cancel the flow (collection) just cancel the publisher
cancellable.cancel()
```
For the suspend functions you should use the `createFuture(for:)` function:
```swift
// Create a Future/AnyPublisher for the suspend function
let future = createFuture(for: randomLettersGenerator.getRandomLettersNative())
// Now use this future as you would any other
let cancellable = future.sink { completion in
print("Received completion: \(completion)")
} receiveValue: { value in
print("Received value: \(value)")
}
// To cancel the suspend function just cancel the future
cancellable.cancel()
```
You can also use the `createPublisher(for:)` function for suspend functions that return a `Flow`:
```swift
let publisher = createPublisher(for: randomLettersGenerator.getRandomLettersFlowNative())
```
**Note:** these functions create deferred `AnyPublisher`s.
Meaning every subscription will trigger the collection of the `Flow` or execution of the suspend function.
### RxSwift
The RxSwift implementation provides a couple functions to get an `Observable` or `Single` for your Coroutines code.
@ -227,93 +310,3 @@ let observable = createObservable(for: randomLettersGenerator.getRandomLettersFl
**Note:** these functions create deferred `Observable`s and `Single`s.
Meaning every subscription will trigger the collection of the `Flow` or execution of the suspend function.
### Combine
The Combine implementation provides a couple functions to get an `AnyPublisher` for your Coroutines code.
For your `Flow`s use the `createPublisher(for:)` function:
```swift
// Create an AnyPublisher for your flow
let publisher = createPublisher(for: clock.timeNative)
// Now use this publisher as you would any other
let cancellable = publisher.sink { completion in
print("Received completion: \(completion)")
} receiveValue: { value in
print("Received value: \(value)")
}
// To cancel the flow (collection) just cancel the publisher
cancellable.cancel()
```
For the suspend functions you should use the `createFuture(for:)` function:
```swift
// Create a Future/AnyPublisher for the suspend function
let future = createFuture(for: randomLettersGenerator.getRandomLettersNative())
// Now use this future as you would any other
let cancellable = future.sink { completion in
print("Received completion: \(completion)")
} receiveValue: { value in
print("Received value: \(value)")
}
// To cancel the suspend function just cancel the future
cancellable.cancel()
```
You can also use the `createPublisher(for:)` function for suspend functions that return a `Flow`:
```swift
let publisher = createPublisher(for: randomLettersGenerator.getRandomLettersFlowNative())
```
**Note:** these functions create deferred `AnyPublisher`s.
Meaning every subscription will trigger the collection of the `Flow` or execution of the suspend function.
### Swift 5.5 Async/Await
> :construction: : the Async implementation requires Xcode 13.2 which is currently in beta!
The Async implementation provides some functions to get async Swift functions and `AsyncStream`s.
Use the `asyncFunction(for:)` function to get an async function that can be awaited:
```swift
let handle = Task {
do {
let letters = try await asyncFunction(for: randomLettersGenerator.getRandomLettersNative())
print("Got random letters: \(letters)")
} catch {
print("Failed with error: \(error)")
}
}
// To cancel the suspend function just cancel the async task
handle.cancel()
```
or if you don't like these do-catches you can use the `asyncResult(for:)` function:
```swift
let result = await asyncResult(for: randomLettersGenerator.getRandomLettersNative())
if case let .success(letters) = result {
print("Got random letters: \(letters)")
}
```
For `Flow`s there is the `asyncStream(for:)` function to get an `AsyncStream`:
```swift
let handle = Task {
do {
let stream = asyncStream(for: randomLettersGenerator.getRandomLettersFlowNative())
for try await letters in stream {
print("Got random letters: \(letters)")
}
} catch {
print("Failed with error: \(error)")
}
}
// To cancel the flow (collection) just cancel the async task
handle.cancel()
```

View file

@ -1,60 +0,0 @@
//
// Future.swift
// KMPNativeCoroutinesCombine
//
// Created by Rick Clephas on 06/06/2021.
//
import Combine
import KMPNativeCoroutinesCore
/// Creates an `AnyPublisher` for the provided `NativeSuspend`.
/// - Parameter nativeSuspend: The native suspend function to await.
/// - Returns: A publisher that either finishes with a single value or fails with an error.
public func createFuture<Result, Failure: Error, Unit>(
for nativeSuspend: @escaping NativeSuspend<Result, Failure, Unit>
) -> AnyPublisher<Result, Failure> {
return NativeSuspendFuture(nativeSuspend: nativeSuspend)
.eraseToAnyPublisher()
}
internal struct NativeSuspendFuture<Result, Failure: Error, Unit>: Publisher {
typealias Output = Result
typealias Failure = Failure
let nativeSuspend: NativeSuspend<Result, Failure, Unit>
func receive<S>(subscriber: S) where S : Subscriber, Failure == S.Failure, Result == S.Input {
let subscription = NativeSuspendSubscription(nativeSuspend: nativeSuspend, subscriber: subscriber)
subscriber.receive(subscription: subscription)
}
}
internal class NativeSuspendSubscription<Result, Failure, Unit, S: Subscriber>: Subscription where S.Input == Result, S.Failure == Failure {
private var nativeCancellable: NativeCancellable<Unit>? = nil
private var subscriber: S?
init(nativeSuspend: NativeSuspend<Result, Failure, Unit>, subscriber: S) {
self.subscriber = subscriber
nativeCancellable = nativeSuspend({ output, unit in
if let subscriber = self.subscriber {
_ = subscriber.receive(output)
subscriber.receive(completion: .finished)
}
return unit
}, { error, unit in
self.subscriber?.receive(completion: .failure(error))
return unit
})
}
func request(_ demand: Subscribers.Demand) { }
func cancel() {
subscriber = nil
_ = nativeCancellable?()
nativeCancellable = nil
}
}

View file

@ -1,20 +0,0 @@
//
// FuturePublisher.swift
// KMPNativeCoroutinesCombine
//
// Created by Rick Clephas on 28/06/2021.
//
import Combine
import KMPNativeCoroutinesCore
/// Creates an `AnyPublisher` for the provided `NativeSuspend` that returns a `NativeFlow`.
/// - Parameter nativeSuspend: The native suspend function to await.
/// - Returns: A publisher that publishes the collected values.
public func createPublisher<Output, Failure: Error, Unit>(
for nativeSuspend: @escaping NativeSuspend<NativeFlow<Output, Failure, Unit>, Failure, Unit>
) -> AnyPublisher<Output, Failure> {
return createFuture(for: nativeSuspend)
.flatMap { createPublisher(for: $0) }
.eraseToAnyPublisher()
}

View file

@ -1,61 +0,0 @@
//
// Publisher.swift
// KMPNativeCoroutinesCombine
//
// Created by Rick Clephas on 06/06/2021.
//
import Combine
import KMPNativeCoroutinesCore
/// Creates an `AnyPublisher` for the provided `NativeFlow`.
/// - Parameter nativeFlow: The native flow to collect.
/// - Returns: A publisher that publishes the collected values.
public func createPublisher<Output, Failure: Error, Unit>(
for nativeFlow: @escaping NativeFlow<Output, Failure, Unit>
) -> AnyPublisher<Output, Failure> {
return NativeFlowPublisher(nativeFlow: nativeFlow)
.eraseToAnyPublisher()
}
internal struct NativeFlowPublisher<Output, Failure: Error, Unit>: Publisher {
typealias Output = Output
typealias Failure = Failure
let nativeFlow: NativeFlow<Output, Failure, Unit>
func receive<S>(subscriber: S) where S : Subscriber, Failure == S.Failure, Output == S.Input {
let subscription = NativeFlowSubscription(nativeFlow: nativeFlow, subscriber: subscriber)
subscriber.receive(subscription: subscription)
}
}
internal class NativeFlowSubscription<Output, Failure, Unit, S: Subscriber>: Subscription where S.Input == Output, S.Failure == Failure {
private var nativeCancellable: NativeCancellable<Unit>? = nil
private var subscriber: S?
init(nativeFlow: NativeFlow<Output, Failure, Unit>, subscriber: S) {
self.subscriber = subscriber
nativeCancellable = nativeFlow({ item, unit in
_ = self.subscriber?.receive(item)
return unit
}, { error, unit in
if let error = error {
self.subscriber?.receive(completion: .failure(error))
} else {
self.subscriber?.receive(completion: .finished)
}
return unit
})
}
func request(_ demand: Subscribers.Demand) { }
func cancel() {
subscriber = nil
_ = nativeCancellable?()
nativeCancellable = nil
}
}

View file

@ -11,37 +11,37 @@ Kotlin suspend functions are exposed to Swift as functions with a completion han
This allows you to easily use them from your Swift code, but it doesn't support cancellation.
> While Swift 5.5 brings async functions to Swift, it doesn't solve this issue.
> For interoperability with ObjC all function with a completion handler can be called like an async function.
> For interoperability with ObjC all functions with a completion handler can be called like an async function.
> This means starting with Swift 5.5 your Kotlin suspend functions will look like Swift async functions.
> But that's just syntactic sugar, so there's still no cancellation support.
Besides cancellation support, ObjC doesn't support generics on protocols.
So all the `Flow` interfaces lose their generic value type which make them hard to use.
This library solves both of these limitations :smile: .
This library solves both of these limitations 😄.
## Compatibility
As of version `0.9.0` the library uses Kotlin version `1.6.0`.
As of version `0.10.0` the library uses Kotlin version `1.6.10`.
Compatibility versions for older and early access Kotlin versions are also available:
|Version|Version suffix|Kotlin|Coroutines|
|---|---|:---:|:---:|
|_latest_|-new-mm|1.6.0|1.5.1-new-mm-dev2|
|**_latest_**|**_no suffix_**|**1.6.0**|**1.5.2-native-mt**|
|0.8.0|_no suffix_|1.5.30|1.5.2-native-mt|
|0.8.0|-kotlin-1.5.20|1.5.20|1.5.0-native-mt|
| Version | Version suffix | Kotlin | Coroutines |
|--------------|-----------------|:----------:|:-------------------:|
| _latest_ | -new-mm | 1.6.10 | 1.6.0-RC3 |
| **_latest_** | **_no suffix_** | **1.6.10** | **1.5.2-native-mt** |
| _latest_ | -kotlin-1.6.0 | 1.6.0 | 1.5.2-native-mt |
| 0.9.0 | -new-mm-3 | 1.6.0 | 1.6.0-RC2 |
| 0.8.0 | _no suffix_ | 1.5.30 | 1.5.2-native-mt |
| 0.8.0 | -kotlin-1.5.20 | 1.5.20 | 1.5.0-native-mt |
You can choose from a couple of Swift implementations.
Depending on the implementation you can support as low as iOS 9, macOS 10.9, tvOS 9 and watchOS 3:
|Implementation|Swift|iOS|macOS|tvOS|watchOS|
|---|:---:|:---:|:---:|:---:|:---:|
|RxSwift|5.0|9.0|10.9|9.0|3.0|
|Combine|5.0|13.0|10.15|13.0|6.0|
|Async :construction:|5.5|13.0|10.15|13.0|6.0|
> :construction: : the Async implementation requires Xcode 13.2 which is currently in beta!
| Implementation | Swift | iOS | macOS | tvOS | watchOS |
|----------------|:-----:|:----:|:-----:|:----:|:-------:|
| Async | 5.5 | 13.0 | 10.15 | 13.0 | 6.0 |
| Combine | 5.0 | 13.0 | 10.15 | 13.0 | 6.0 |
| RxSwift | 5.0 | 9.0 | 10.9 | 9.0 | 3.0 |
## Installation
@ -62,23 +62,9 @@ plugins {
}
```
### Swift (CocoaPods)
Now for Swift you can choose from a couple of implementations.
Add one or more of the following libraries to your `Podfile`:
```ruby
pod 'KMPNativeCoroutinesCombine' # Combine implementation
pod 'KMPNativeCoroutinesRxSwift' # RxSwift implementation
pod 'KMPNativeCoroutinesAsync' # Swift 5.5 Async/Await implementation
```
### Swift (Swift Package Manager)
All Swift implementations are also available via the Swift Package Manager.
> **NOTE:** `KMPNativeCoroutinesAsync` requires Xcode 13.2 which is currently in beta.
> To add the async implementation you should add the `-swift-async-await` suffix to the version.
All Swift implementations are also available via the Swift Package Manager.
Just add it to your `Package.swift` file:
```swift
dependencies: [
@ -86,9 +72,19 @@ dependencies: [
]
```
Or add it in Xcode by going to `File` > `Add Packages...` and providing the URL:
Or add it in Xcode by going to `File` > `Add Packages...` and providing the URL:
`https://github.com/rickclephas/KMP-NativeCoroutines.git`.
### Swift (CocoaPods)
Now for Swift you can choose from a couple of implementations.
Add one or more of the following libraries to your `Podfile`:
```ruby
pod 'KMPNativeCoroutinesAsync' # Swift 5.5 Async/Await implementation
pod 'KMPNativeCoroutinesCombine' # Combine implementation
pod 'KMPNativeCoroutinesRxSwift' # RxSwift implementation
```
## Usage
Using your Kotlin Coroutines code from Swift is almost as easy as calling the Kotlin code.
@ -96,7 +92,7 @@ Just use the wrapper functions in Swift to get Observables, Publishers, AsyncStr
### Kotlin
The plugin will automagically generate the necessary code for you! :crystal_ball:
The plugin will automagically generate the necessary code for you! 🔮
Your `Flow` properties/functions get a `Native` version:
```kotlin
@ -123,7 +119,6 @@ val timeNativeReplayCache
The plugin also generates `Native` versions for all your suspend functions:
```kotlin
class RandomLettersGenerator {
// Somewhere in your Kotlin code you define a suspend function
suspend fun getRandomLetters(): String {
@ -178,6 +173,94 @@ val ignoredFlowProperty: Flow<Int>
suspend fun ignoredSuspendFunction() { }
```
### Swift 5.5 Async/Await
The Async implementation provides some functions to get async Swift functions and `AsyncStream`s.
Use the `asyncFunction(for:)` function to get an async function that can be awaited:
```swift
let handle = Task {
do {
let letters = try await asyncFunction(for: randomLettersGenerator.getRandomLettersNative())
print("Got random letters: \(letters)")
} catch {
print("Failed with error: \(error)")
}
}
// To cancel the suspend function just cancel the async task
handle.cancel()
```
or if you don't like these do-catches you can use the `asyncResult(for:)` function:
```swift
let result = await asyncResult(for: randomLettersGenerator.getRandomLettersNative())
if case let .success(letters) = result {
print("Got random letters: \(letters)")
}
```
For `Flow`s there is the `asyncStream(for:)` function to get an `AsyncStream`:
```swift
let handle = Task {
do {
let stream = asyncStream(for: randomLettersGenerator.getRandomLettersFlowNative())
for try await letters in stream {
print("Got random letters: \(letters)")
}
} catch {
print("Failed with error: \(error)")
}
}
// To cancel the flow (collection) just cancel the async task
handle.cancel()
```
### Combine
The Combine implementation provides a couple functions to get an `AnyPublisher` for your Coroutines code.
For your `Flow`s use the `createPublisher(for:)` function:
```swift
// Create an AnyPublisher for your flow
let publisher = createPublisher(for: clock.timeNative)
// Now use this publisher as you would any other
let cancellable = publisher.sink { completion in
print("Received completion: \(completion)")
} receiveValue: { value in
print("Received value: \(value)")
}
// To cancel the flow (collection) just cancel the publisher
cancellable.cancel()
```
For the suspend functions you should use the `createFuture(for:)` function:
```swift
// Create a Future/AnyPublisher for the suspend function
let future = createFuture(for: randomLettersGenerator.getRandomLettersNative())
// Now use this future as you would any other
let cancellable = future.sink { completion in
print("Received completion: \(completion)")
} receiveValue: { value in
print("Received value: \(value)")
}
// To cancel the suspend function just cancel the future
cancellable.cancel()
```
You can also use the `createPublisher(for:)` function for suspend functions that return a `Flow`:
```swift
let publisher = createPublisher(for: randomLettersGenerator.getRandomLettersFlowNative())
```
**Note:** these functions create deferred `AnyPublisher`s.
Meaning every subscription will trigger the collection of the `Flow` or execution of the suspend function.
### RxSwift
The RxSwift implementation provides a couple functions to get an `Observable` or `Single` for your Coroutines code.
@ -227,93 +310,3 @@ let observable = createObservable(for: randomLettersGenerator.getRandomLettersFl
**Note:** these functions create deferred `Observable`s and `Single`s.
Meaning every subscription will trigger the collection of the `Flow` or execution of the suspend function.
### Combine
The Combine implementation provides a couple functions to get an `AnyPublisher` for your Coroutines code.
For your `Flow`s use the `createPublisher(for:)` function:
```swift
// Create an AnyPublisher for your flow
let publisher = createPublisher(for: clock.timeNative)
// Now use this publisher as you would any other
let cancellable = publisher.sink { completion in
print("Received completion: \(completion)")
} receiveValue: { value in
print("Received value: \(value)")
}
// To cancel the flow (collection) just cancel the publisher
cancellable.cancel()
```
For the suspend functions you should use the `createFuture(for:)` function:
```swift
// Create a Future/AnyPublisher for the suspend function
let future = createFuture(for: randomLettersGenerator.getRandomLettersNative())
// Now use this future as you would any other
let cancellable = future.sink { completion in
print("Received completion: \(completion)")
} receiveValue: { value in
print("Received value: \(value)")
}
// To cancel the suspend function just cancel the future
cancellable.cancel()
```
You can also use the `createPublisher(for:)` function for suspend functions that return a `Flow`:
```swift
let publisher = createPublisher(for: randomLettersGenerator.getRandomLettersFlowNative())
```
**Note:** these functions create deferred `AnyPublisher`s.
Meaning every subscription will trigger the collection of the `Flow` or execution of the suspend function.
### Swift 5.5 Async/Await
> :construction: : the Async implementation requires Xcode 13.2 which is currently in beta!
The Async implementation provides some functions to get async Swift functions and `AsyncStream`s.
Use the `asyncFunction(for:)` function to get an async function that can be awaited:
```swift
let handle = Task {
do {
let letters = try await asyncFunction(for: randomLettersGenerator.getRandomLettersNative())
print("Got random letters: \(letters)")
} catch {
print("Failed with error: \(error)")
}
}
// To cancel the suspend function just cancel the async task
handle.cancel()
```
or if you don't like these do-catches you can use the `asyncResult(for:)` function:
```swift
let result = await asyncResult(for: randomLettersGenerator.getRandomLettersNative())
if case let .success(letters) = result {
print("Got random letters: \(letters)")
}
```
For `Flow`s there is the `asyncStream(for:)` function to get an `AsyncStream`:
```swift
let handle = Task {
do {
let stream = asyncStream(for: randomLettersGenerator.getRandomLettersFlowNative())
for try await letters in stream {
print("Got random letters: \(letters)")
}
} catch {
print("Failed with error: \(error)")
}
}
// To cancel the flow (collection) just cancel the async task
handle.cancel()
```

View file

@ -21,7 +21,7 @@
"name": "Build common",
"execution_position": "before_compile",
"shell_path": "/bin/sh",
"script": " if [ \"YES\" = \"$COCOAPODS_SKIP_KOTLIN_BUILD\" ]; then\n echo \"Skipping Gradle build task invocation due to COCOAPODS_SKIP_KOTLIN_BUILD environment variable set to \"YES\"\"\n exit 0\n fi\n set -ev\n REPO_ROOT=\"$PODS_TARGET_SRCROOT\"\n \"$REPO_ROOT/../gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -PkotlinVersion=\"1.6.0\" -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=$CONFIGURATION -Pkotlin.native.cocoapods.cflags=\"$OTHER_CFLAGS\" -Pkotlin.native.cocoapods.paths.headers=\"$HEADER_SEARCH_PATHS\" -Pkotlin.native.cocoapods.paths.frameworks=\"$FRAMEWORK_SEARCH_PATHS\"\n"
"script": " if [ \"YES\" = \"$COCOAPODS_SKIP_KOTLIN_BUILD\" ]; then\n echo \"Skipping Gradle build task invocation due to COCOAPODS_SKIP_KOTLIN_BUILD environment variable set to \"YES\"\"\n exit 0\n fi\n set -ev\n REPO_ROOT=\"$PODS_TARGET_SRCROOT\"\n \"$REPO_ROOT/../gradlew\" -p \"$REPO_ROOT\" $KOTLIN_PROJECT_PATH:syncFramework -PkotlinVersion=\"1.6.10\" -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME -Pkotlin.native.cocoapods.archs=\"$ARCHS\" -Pkotlin.native.cocoapods.configuration=$CONFIGURATION -Pkotlin.native.cocoapods.cflags=\"$OTHER_CFLAGS\" -Pkotlin.native.cocoapods.paths.headers=\"$HEADER_SEARCH_PATHS\" -Pkotlin.native.cocoapods.paths.frameworks=\"$FRAMEWORK_SEARCH_PATHS\"\n"
}
],
"platforms": {

View file

@ -1,16 +1,16 @@
PODS:
- common (1.0)
- KMPNativeCoroutinesCombine (0.9.0):
- KMPNativeCoroutinesCore (= 0.9.0)
- KMPNativeCoroutinesCore (0.9.0)
- KMPNativeCoroutinesAsync (0.10.0):
- KMPNativeCoroutinesCore (= 0.10.0)
- KMPNativeCoroutinesCore (0.10.0)
DEPENDENCIES:
- common (from `../../common`)
- KMPNativeCoroutinesCombine (= 0.9.0)
- KMPNativeCoroutinesAsync (= 0.10.0)
SPEC REPOS:
trunk:
- KMPNativeCoroutinesCombine
- KMPNativeCoroutinesAsync
- KMPNativeCoroutinesCore
EXTERNAL SOURCES:
@ -18,10 +18,10 @@ EXTERNAL SOURCES:
:path: "../../common"
SPEC CHECKSUMS:
common: 7e8d176d3cfcbbb6a4901dbf0bd759685bf4dd86
KMPNativeCoroutinesCombine: 3a3c39852cf9fcb764b97ac604bd1cfacdd720c7
KMPNativeCoroutinesCore: a9abca92a371f0c1af62bfb06c94c943ad515114
common: 6bdd4aad82fe8e27657799269c3615cf5e9cd389
KMPNativeCoroutinesAsync: 66512d0bf4933d0b160416795284beb8ecf089b8
KMPNativeCoroutinesCore: 2e2573a75f27178d4cbd7be385f0f0a54416a47a
PODFILE CHECKSUM: e35181d90508d66984e05816593afec34fcc1d9a
PODFILE CHECKSUM: c82371f217f8782254550b881ac2b3b5acdbe1bb
COCOAPODS: 1.9.3
COCOAPODS: 1.11.2

File diff suppressed because it is too large Load diff

View file

@ -4,18 +4,13 @@
<dict>
<key>SchemeUserState</key>
<dict>
<key>KMPNativeCoroutinesCombine.xcscheme</key>
<key>KMPNativeCoroutinesAsync.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>KMPNativeCoroutinesCombine.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
</dict>
<key>KMPNativeCoroutinesCore.xcscheme</key>
<dict>
<key>isShown</key>
@ -23,17 +18,12 @@
<key>orderHint</key>
<integer>2</integer>
</dict>
<key>KMPNativeCoroutinesCore.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>4</integer>
</dict>
<key>Pods-PeopleInSpaceSwiftUI.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>1</integer>
<integer>3</integer>
</dict>
<key>Pods-PeopleInSpaceWidgetExtension.xcscheme</key>
<dict>
@ -42,11 +32,6 @@
<key>orderHint</key>
<integer>4</integer>
</dict>
<key>Pods-PeopleInSpaceWidgetExtension.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>6</integer>
</dict>
<key>common.xcscheme</key>
<dict>
<key>isShown</key>

View file

@ -0,0 +1,5 @@
#import <Foundation/Foundation.h>
@interface PodsDummy_KMPNativeCoroutinesAsync : NSObject
@end
@implementation PodsDummy_KMPNativeCoroutinesAsync
@end

View file

@ -11,6 +11,6 @@
#endif
FOUNDATION_EXPORT double KMPNativeCoroutinesCombineVersionNumber;
FOUNDATION_EXPORT const unsigned char KMPNativeCoroutinesCombineVersionString[];
FOUNDATION_EXPORT double KMPNativeCoroutinesAsyncVersionNumber;
FOUNDATION_EXPORT const unsigned char KMPNativeCoroutinesAsyncVersionString[];

View file

@ -1,12 +1,14 @@
APPLICATION_EXTENSION_API_ONLY = YES
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCombine
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesAsync
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap" -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/KMPNativeCoroutinesCombine
PODS_TARGET_SRCROOT = ${PODS_ROOT}/KMPNativeCoroutinesAsync
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore"

View file

@ -0,0 +1,6 @@
module KMPNativeCoroutinesAsync {
umbrella header "KMPNativeCoroutinesAsync-umbrella.h"
export *
module * { export * }
}

View file

@ -1,12 +1,14 @@
APPLICATION_EXTENSION_API_ONLY = YES
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCombine
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesAsync
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap" -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/KMPNativeCoroutinesCombine
PODS_TARGET_SRCROOT = ${PODS_ROOT}/KMPNativeCoroutinesAsync
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore"

View file

@ -1,5 +0,0 @@
#import <Foundation/Foundation.h>
@interface PodsDummy_KMPNativeCoroutinesCombine : NSObject
@end
@implementation PodsDummy_KMPNativeCoroutinesCombine
@end

View file

@ -1,6 +0,0 @@
module KMPNativeCoroutinesCombine {
umbrella header "KMPNativeCoroutinesCombine-umbrella.h"
export *
module * { export * }
}

View file

@ -1,4 +1,5 @@
APPLICATION_EXTENSION_API_ONLY = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}"
@ -6,6 +7,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/KMPNativeCoroutinesCore
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES

View file

@ -1,4 +1,5 @@
APPLICATION_EXTENSION_API_ONLY = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}"
@ -6,6 +7,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/KMPNativeCoroutinesCore
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES

View file

@ -1,7 +1,7 @@
# Acknowledgements
This application makes use of the following third party libraries:
## KMPNativeCoroutinesCombine
## KMPNativeCoroutinesAsync
MIT License

View file

@ -39,7 +39,7 @@ SOFTWARE.
<key>License</key>
<string>MIT</string>
<key>Title</key>
<string>KMPNativeCoroutinesCombine</string>
<string>KMPNativeCoroutinesAsync</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>

View file

@ -1,13 +1,15 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../../common/build/cocoapods/framework"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCombine" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore"
OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCombine/KMPNativeCoroutinesCombine.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap"
OTHER_LDFLAGS = $(inherited) -ObjC -l"KMPNativeCoroutinesCombine" -l"KMPNativeCoroutinesCore" -l"c++" -framework "Combine" -framework "common"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCombine/KMPNativeCoroutinesCombine.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap"
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesAsync" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore" /usr/lib/swift
OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesAsync/KMPNativeCoroutinesAsync.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap"
OTHER_LDFLAGS = $(inherited) -ObjC -l"KMPNativeCoroutinesAsync" -l"KMPNativeCoroutinesCore" -l"c++" -framework "common"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesAsync/KMPNativeCoroutinesAsync.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCombine" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore"
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesAsync" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore"
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES

View file

@ -1,13 +1,15 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../../common/build/cocoapods/framework"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCombine" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore"
OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCombine/KMPNativeCoroutinesCombine.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap"
OTHER_LDFLAGS = $(inherited) -ObjC -l"KMPNativeCoroutinesCombine" -l"KMPNativeCoroutinesCore" -l"c++" -framework "Combine" -framework "common"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCombine/KMPNativeCoroutinesCombine.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap"
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesAsync" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore" /usr/lib/swift
OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesAsync/KMPNativeCoroutinesAsync.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap"
OTHER_LDFLAGS = $(inherited) -ObjC -l"KMPNativeCoroutinesAsync" -l"KMPNativeCoroutinesCore" -l"c++" -framework "common"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesAsync/KMPNativeCoroutinesAsync.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCombine" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore"
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesAsync" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore"
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES

View file

@ -1,7 +1,7 @@
# Acknowledgements
This application makes use of the following third party libraries:
## KMPNativeCoroutinesCombine
## KMPNativeCoroutinesAsync
MIT License

View file

@ -39,7 +39,7 @@ SOFTWARE.
<key>License</key>
<string>MIT</string>
<key>Title</key>
<string>KMPNativeCoroutinesCombine</string>
<string>KMPNativeCoroutinesAsync</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>

View file

@ -1,12 +1,14 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../../common/build/cocoapods/framework"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCombine" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore"
OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCombine/KMPNativeCoroutinesCombine.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap"
OTHER_LDFLAGS = $(inherited) -ObjC -l"KMPNativeCoroutinesCombine" -l"KMPNativeCoroutinesCore" -l"c++" -framework "Combine" -framework "common"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCombine/KMPNativeCoroutinesCombine.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap"
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesAsync" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore" /usr/lib/swift
OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesAsync/KMPNativeCoroutinesAsync.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap"
OTHER_LDFLAGS = $(inherited) -ObjC -l"KMPNativeCoroutinesAsync" -l"KMPNativeCoroutinesCore" -l"c++" -framework "common"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesAsync/KMPNativeCoroutinesAsync.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCombine" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore"
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesAsync" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore"
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES

View file

@ -1,12 +1,14 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../../common/build/cocoapods/framework"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCombine" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore"
OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCombine/KMPNativeCoroutinesCombine.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap"
OTHER_LDFLAGS = $(inherited) -ObjC -l"KMPNativeCoroutinesCombine" -l"KMPNativeCoroutinesCore" -l"c++" -framework "Combine" -framework "common"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCombine/KMPNativeCoroutinesCombine.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap"
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesAsync" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore" /usr/lib/swift
OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesAsync/KMPNativeCoroutinesAsync.modulemap" -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap"
OTHER_LDFLAGS = $(inherited) -ObjC -l"KMPNativeCoroutinesAsync" -l"KMPNativeCoroutinesCore" -l"c++" -framework "common"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesAsync/KMPNativeCoroutinesAsync.modulemap" -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore/KMPNativeCoroutinesCore.modulemap"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCombine" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore"
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesAsync" "${PODS_CONFIGURATION_BUILD_DIR}/KMPNativeCoroutinesCore"
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES

View file

@ -1,4 +1,5 @@
APPLICATION_EXTENSION_API_ONLY = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/common
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../../common/build/cocoapods/framework"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
@ -7,6 +8,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/../../../common
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
PRODUCT_MODULE_NAME = common
SKIP_INSTALL = YES

View file

@ -1,4 +1,5 @@
APPLICATION_EXTENSION_API_ONLY = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/common
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../../common/build/cocoapods/framework"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
@ -7,6 +8,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/../../../common
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
PRODUCT_MODULE_NAME = common
SKIP_INSTALL = YES

View file

@ -7,7 +7,7 @@
<key>PeopleInSpace.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>

View file

@ -9,20 +9,34 @@
<key>isShown</key>
<false/>
</dict>
<key>KMPNativeCoroutinesCombine.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>4</integer>
</dict>
<key>KMPNativeCoroutinesCore.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
<key>KMPNativeCoroutinesCore.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>3</integer>
</dict>
<key>Pods-PeopleInSpace.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>2</integer>
</dict>
<key>common.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>1</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>

View file

@ -11,5 +11,5 @@ rootProject.name = "PeopleInSpace"
include(":app", ":common", ":compose-desktop")
include(":web")
include(":compose-web")
include(":backend")
//include(":backend")
include(":wearApp")

View file

@ -18,7 +18,7 @@ android {
}
composeOptions {
kotlinCompilerExtensionVersion = Versions.compose
kotlinCompilerExtensionVersion = Versions.composeCompiler
}
kotlinOptions {
@ -53,6 +53,7 @@ dependencies {
}
with(Deps.Compose) {
implementation(compiler)
implementation(wearFoundation)
implementation(wearMaterial)
implementation(wearNavigation)