├── .github
├── actions
│ ├── cache-konan
│ │ └── action.yaml
│ └── publish-spm-tag
│ │ └── action.yaml
└── workflows
│ ├── code-quality.yaml
│ ├── release-idea.yaml
│ ├── release-kotlin-preview.yaml
│ ├── release-kotlin.yaml
│ ├── release-swift.yaml
│ ├── run-idea-tests.yaml
│ ├── run-integration-tests.yaml
│ ├── run-kotlin-tests.yaml
│ ├── run-swift-tests.yaml
│ └── run-tests.yaml
├── .gitignore
├── .idea
├── .gitignore
├── .name
├── codeStyles
│ ├── Project.xml
│ └── codeStyleConfig.xml
├── kotlinc.xml
├── libraries-with-intellij-classes.xml
├── misc.xml
├── runConfigurations
│ ├── Compiler_Tests.xml
│ ├── Core_Tests.xml
│ ├── KSP_Tests.xml
│ ├── Run_IDE.xml
│ └── Verify_Plugin.xml
└── vcs.xml
├── KMPNativeCoroutines.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── xcshareddata
│ └── xcschemes
│ ├── KMPNativeCoroutinesAsync.xcscheme
│ ├── KMPNativeCoroutinesCombine.xcscheme
│ ├── KMPNativeCoroutinesCore.xcscheme
│ └── KMPNativeCoroutinesRxSwift.xcscheme
├── KMPNativeCoroutinesAsync.podspec
├── KMPNativeCoroutinesAsync
├── AsyncError.swift
├── AsyncFunction.swift
├── AsyncResult.swift
└── AsyncSequence.swift
├── KMPNativeCoroutinesAsyncTests
├── AsyncFunctionTests.swift
├── AsyncResultTests.swift
└── AsyncSequenceTests.swift
├── KMPNativeCoroutinesCombine.podspec
├── KMPNativeCoroutinesCombine
├── Future.swift
├── FuturePublisher.swift
└── Publisher.swift
├── KMPNativeCoroutinesCombineTests
├── FutureTests.swift
└── PublisherTests.swift
├── KMPNativeCoroutinesCore.podspec
├── KMPNativeCoroutinesCore
├── NativeCallback.swift
├── NativeCancellable.swift
├── NativeFlow.swift
└── NativeSuspend.swift
├── KMPNativeCoroutinesRxSwift.podspec
├── KMPNativeCoroutinesRxSwift
├── Observable.swift
├── Single.swift
└── SingleObservable.swift
├── KMPNativeCoroutinesRxSwiftTests
├── ObservableTests.swift
└── SingleTests.swift
├── LICENSE.txt
├── MIGRATING_TO_V1.md
├── Package.swift
├── README.md
├── build.gradle.kts
├── buildSrc
├── build.gradle.kts
├── settings.gradle.kts
└── src
│ └── main
│ └── kotlin
│ ├── BuildType.kt
│ ├── kmp-nativecoroutines-kotlin-jvm.gradle.kts
│ ├── kmp-nativecoroutines-kotlin-multiplatform.gradle.kts
│ └── kmp-nativecoroutines-publish.gradle.kts
├── gradle.properties
├── gradle
├── libs.versions.toml
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── kmp-nativecoroutines-annotations
├── api
│ ├── kmp-nativecoroutines-annotations.api
│ └── kmp-nativecoroutines-annotations.klib.api
├── build.gradle.kts
└── src
│ ├── commonMain
│ └── kotlin
│ │ └── com
│ │ └── rickclephas
│ │ └── kmp
│ │ └── nativecoroutines
│ │ ├── NativeCoroutineScope.kt
│ │ ├── NativeCoroutines.kt
│ │ ├── NativeCoroutinesIgnore.kt
│ │ ├── NativeCoroutinesRefined.kt
│ │ ├── NativeCoroutinesRefinedState.kt
│ │ └── NativeCoroutinesState.kt
│ └── jvmMain
│ └── resources
│ └── META-INF
│ └── com
│ └── rickclephas
│ └── kmp
│ └── kmp-nativecoroutines-annotations-jvm
│ └── verification.properties
├── kmp-nativecoroutines-compiler-embeddable
├── .gitignore
├── api
│ └── kmp-nativecoroutines-compiler-embeddable.api
└── build.gradle.kts
├── kmp-nativecoroutines-compiler
├── api
│ └── kmp-nativecoroutines-compiler.api
├── build.gradle.kts
├── gradle.properties
└── src
│ ├── main
│ ├── kotlin
│ │ └── com
│ │ │ └── rickclephas
│ │ │ └── kmp
│ │ │ └── nativecoroutines
│ │ │ └── compiler
│ │ │ ├── KmpNativeCoroutinesCommandLineProcessor.kt
│ │ │ ├── KmpNativeCoroutinesCompilerPluginRegistrar.kt
│ │ │ ├── classic
│ │ │ ├── diagnostics
│ │ │ │ ├── DefaultErrorMessages.kt
│ │ │ │ ├── KmpNativeCoroutinesChecker.kt
│ │ │ │ └── KmpNativeCoroutinesErrors.kt
│ │ │ ├── extensions
│ │ │ │ └── KmpNativeCoroutinesStorageComponentContainerContributor.kt
│ │ │ └── utils
│ │ │ │ ├── CoroutinesReturnType.kt
│ │ │ │ ├── ImplicitReturnType.kt
│ │ │ │ ├── NativeCoroutinesAnnotations.kt
│ │ │ │ └── ObjCRefinement.kt
│ │ │ ├── config
│ │ │ ├── CompilerConfiguration.kt
│ │ │ ├── ConfigListOption.kt
│ │ │ ├── ConfigOption.kt
│ │ │ ├── ExposedSeverity.kt
│ │ │ ├── GeneratedSourceDir.kt
│ │ │ ├── K2Mode.kt
│ │ │ └── Suffixes.kt
│ │ │ ├── fir
│ │ │ ├── codegen
│ │ │ │ ├── Annotations.kt
│ │ │ │ ├── CallableReferenceBlock.kt
│ │ │ │ ├── NativeFunction.kt
│ │ │ │ ├── NativeProperty.kt
│ │ │ │ ├── PropertyAccessor.kt
│ │ │ │ ├── ReceiverParameter.kt
│ │ │ │ ├── SharedFlowReplayCache.kt
│ │ │ │ ├── StateFlowValue.kt
│ │ │ │ ├── TodoCall.kt
│ │ │ │ ├── TypeParameters.kt
│ │ │ │ └── ValueParameters.kt
│ │ │ ├── diagnostics
│ │ │ │ ├── FirDefaultErrorMessages.kt
│ │ │ │ ├── FirKmpNativeCoroutinesDeclarationChecker.kt
│ │ │ │ └── FirKmpNativeCoroutinesErrors.kt
│ │ │ ├── extensions
│ │ │ │ ├── KmpNativeCoroutinesDeclarationGenerationExtension.kt
│ │ │ │ ├── KmpNativeCoroutinesFirAdditionalCheckersExtension.kt
│ │ │ │ └── KmpNativeCoroutinesFirExtensionRegistrar.kt
│ │ │ └── utils
│ │ │ │ ├── CoroutinesReturnType.kt
│ │ │ │ ├── FirCallableSignature.kt
│ │ │ │ ├── FirDeclarationStatus.kt
│ │ │ │ ├── FirLiteralExpression.kt
│ │ │ │ ├── FirResolvedTypeRef.kt
│ │ │ │ ├── ImplicitReturnType.kt
│ │ │ │ ├── NativeConeKotlinType.kt
│ │ │ │ ├── NativeCoroutinesAnnotations.kt
│ │ │ │ ├── NativeCoroutinesDeclarationKey.kt
│ │ │ │ └── ObjCRefinement.kt
│ │ │ ├── ir
│ │ │ ├── codegen
│ │ │ │ ├── CoroutineScope.kt
│ │ │ │ ├── GeneratorContext.kt
│ │ │ │ ├── Lambda.kt
│ │ │ │ ├── NativeFlow.kt
│ │ │ │ ├── NativeFunction.kt
│ │ │ │ ├── NativeProperty.kt
│ │ │ │ ├── NativeSuspend.kt
│ │ │ │ ├── OriginalFunction.kt
│ │ │ │ ├── OriginalProperty.kt
│ │ │ │ ├── SharedFlowReplayCache.kt
│ │ │ │ └── StateFlowValue.kt
│ │ │ ├── extensions
│ │ │ │ ├── KmpNativeCoroutinesIrGenerationExtension.kt
│ │ │ │ └── KmpNativeCoroutinesIrTransformer.kt
│ │ │ └── utils
│ │ │ │ ├── FlowValueTypeArg.kt
│ │ │ │ └── IrBlockBodyExpression.kt
│ │ │ └── utils
│ │ │ ├── CallableIds.kt
│ │ │ ├── CallableSignature.kt
│ │ │ ├── ClassIds.kt
│ │ │ ├── CoroutinesReturnType.kt
│ │ │ ├── FqNames.kt
│ │ │ ├── NameSuffix.kt
│ │ │ ├── Names.kt
│ │ │ └── NativeCoroutinesAnnotation.kt
│ └── resources
│ │ └── META-INF
│ │ └── services
│ │ ├── org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor
│ │ └── org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar
│ ├── test
│ ├── generated
│ │ └── com
│ │ │ └── rickclephas
│ │ │ └── kmp
│ │ │ └── nativecoroutines
│ │ │ └── compiler
│ │ │ └── runners
│ │ │ ├── ClassicDiagnosticsTestGenerated.java
│ │ │ ├── FirLightTreeCodegenTestGenerated.java
│ │ │ ├── FirLightTreeDiagnosticsTestGenerated.java
│ │ │ ├── FirPsiCodegenTestGenerated.java
│ │ │ └── FirPsiDiagnosticsTestGenerated.java
│ └── kotlin
│ │ └── com
│ │ └── rickclephas
│ │ └── kmp
│ │ └── nativecoroutines
│ │ └── compiler
│ │ ├── GenerateTests.kt
│ │ ├── directives
│ │ └── KmpNativeCoroutinesDirectives.kt
│ │ ├── runners
│ │ ├── AbstractBaseDiagnosticsTest.kt
│ │ ├── AbstractClassicDiagnosticsTest.kt
│ │ ├── AbstractFirBaseCodegenTest.kt
│ │ └── AbstractFirDiagnosticsTest.kt
│ │ └── services
│ │ ├── KmpNativeCoroutinesCompilerPluginConfigurator.kt
│ │ └── KmpNativeCoroutinesRuntimeClasspathProvider.kt
│ └── testData
│ ├── codegen
│ ├── annotations.box.txt
│ ├── annotations.fir.ir.txt
│ ├── annotations.fir.kt.txt
│ ├── annotations.fir.txt
│ ├── annotations.kt
│ ├── coroutinescope.box.txt
│ ├── coroutinescope.fir.ir.txt
│ ├── coroutinescope.fir.kt.txt
│ ├── coroutinescope.fir.txt
│ ├── coroutinescope.kt
│ ├── functions.box.txt
│ ├── functions.fir.ir.txt
│ ├── functions.fir.kt.txt
│ ├── functions.fir.txt
│ ├── functions.kt
│ ├── properties.box.txt
│ ├── properties.fir.ir.txt
│ ├── properties.fir.kt.txt
│ ├── properties.fir.txt
│ ├── properties.kt
│ ├── viewmodelscope.box.txt
│ ├── viewmodelscope.fir.ir.txt
│ ├── viewmodelscope.fir.kt.txt
│ ├── viewmodelscope.fir.txt
│ └── viewmodelscope.kt
│ └── diagnostics
│ ├── conflict.kt
│ ├── exposedAnnotated.kt
│ ├── exposedError.kt
│ ├── exposedNone.kt
│ ├── exposedWarning.kt
│ ├── ignored.kt
│ ├── implicitReturnTypeK2.kt
│ ├── implicitReturnTypeKSP.kt
│ ├── incompatible.fir.kt
│ ├── incompatible.kt
│ ├── invalid.kt
│ ├── redundant.kt
│ └── unsupported.kt
├── kmp-nativecoroutines-core
├── api
│ ├── kmp-nativecoroutines-core.api
│ └── kmp-nativecoroutines-core.klib.api
├── build.gradle.kts
└── src
│ ├── appleMain
│ └── kotlin
│ │ └── com
│ │ └── rickclephas
│ │ └── kmp
│ │ └── nativecoroutines
│ │ └── NativeErrorApple.kt
│ ├── appleTest
│ └── kotlin
│ │ └── com
│ │ └── rickclephas
│ │ └── kmp
│ │ └── nativecoroutines
│ │ ├── KotlinCauseApple.kt
│ │ └── NativeErrorAppleTests.kt
│ ├── commonMain
│ └── kotlin
│ │ └── com
│ │ └── rickclephas
│ │ └── kmp
│ │ └── nativecoroutines
│ │ └── Empty.kt
│ ├── commonTest
│ └── kotlin
│ │ └── com
│ │ └── rickclephas
│ │ └── kmp
│ │ └── nativecoroutines
│ │ ├── RandomException.kt
│ │ └── RandomValue.kt
│ ├── compilerTestMain
│ └── kotlin
│ │ └── com
│ │ └── rickclephas
│ │ └── kmp
│ │ └── nativecoroutines
│ │ ├── BoxTest.kt
│ │ └── NativeErrorJvm.kt
│ ├── compilerTestTest
│ └── kotlin
│ │ └── com
│ │ └── rickclephas
│ │ └── kmp
│ │ └── nativecoroutines
│ │ └── KotlinCauseJvm.kt
│ ├── jvmMain
│ └── resources
│ │ └── META-INF
│ │ └── com
│ │ └── rickclephas
│ │ └── kmp
│ │ └── kmp-nativecoroutines-core-jvm
│ │ └── verification.properties
│ ├── nativeCoroutinesMain
│ └── kotlin
│ │ └── com
│ │ └── rickclephas
│ │ └── kmp
│ │ └── nativecoroutines
│ │ ├── CoroutineScope.kt
│ │ ├── NativeCallback.kt
│ │ ├── NativeCancellable.kt
│ │ ├── NativeError.kt
│ │ ├── NativeFlow.kt
│ │ └── NativeSuspend.kt
│ └── nativeCoroutinesTest
│ └── kotlin
│ └── com
│ └── rickclephas
│ └── kmp
│ └── nativecoroutines
│ ├── KotlinCause.kt
│ ├── NativeCallbackTests.kt
│ ├── NativeCancellableTests.kt
│ ├── NativeFlowTests.kt
│ └── NativeSuspendTests.kt
├── kmp-nativecoroutines-gradle-plugin
├── Version.kt
├── api
│ └── kmp-nativecoroutines-gradle-plugin.api
├── build.gradle.kts
└── src
│ └── main
│ └── kotlin
│ └── com
│ └── rickclephas
│ └── kmp
│ └── nativecoroutines
│ └── gradle
│ ├── KmpNativeCoroutinesExtension.kt
│ ├── KmpNativeCoroutinesPlugin.kt
│ └── KspCommandLineArgumentProvider.kt
├── kmp-nativecoroutines-idea-plugin
├── api
│ └── kmp-nativecoroutines-idea-plugin.api
├── build.gradle.kts
├── gradle.properties
└── src
│ └── main
│ ├── kotlin
│ └── com
│ │ └── rickclephas
│ │ └── kmp
│ │ └── nativecoroutines
│ │ └── idea
│ │ ├── compiler
│ │ └── extensions
│ │ │ ├── KmpNativeCoroutinesCompilerPluginProvider.kt
│ │ │ └── KmpNativeCoroutinesStorageComponentContainerContributor.kt
│ │ ├── gradle
│ │ ├── KmpNativeCoroutinesGradleProjectImportHandler.kt
│ │ ├── KmpNativeCoroutinesModel.kt
│ │ ├── KmpNativeCoroutinesModelBuilderService.kt
│ │ └── KmpNativeCoroutinesProjectResolverExtension.kt
│ │ └── quickfixes
│ │ ├── k1
│ │ ├── AddAnnotationFixFactory.kt
│ │ ├── KmpNativeCoroutinesQuickFixContributor.kt
│ │ └── RemoveAnnotationFixFactory.kt
│ │ └── k2
│ │ ├── AddAnnotationFixFactory.kt
│ │ ├── KmpNativeCoroutinesQuickFixRegistrar.kt
│ │ └── RemoveAnnotationFixFactory.kt
│ └── resources
│ └── META-INF
│ ├── plugin.xml
│ └── services
│ └── org.jetbrains.plugins.gradle.tooling.ModelBuilderService
├── kmp-nativecoroutines-ksp
├── api
│ └── kmp-nativecoroutines-ksp.api
├── build.gradle.kts
└── src
│ ├── main
│ ├── kotlin
│ │ └── com
│ │ │ └── rickclephas
│ │ │ └── kmp
│ │ │ └── nativecoroutines
│ │ │ └── ksp
│ │ │ ├── AnnotationSpecs.kt
│ │ │ ├── CoroutineScopeProvider.kt
│ │ │ ├── KmpNativeCoroutinesOptions.kt
│ │ │ ├── KmpNativeCoroutinesSymbolProcessor.kt
│ │ │ ├── KmpNativeCoroutinesSymbolProcessorProvider.kt
│ │ │ ├── Names.kt
│ │ │ ├── NativeCoroutinesFunSpec.kt
│ │ │ ├── NativeCoroutinesPropertySpecs.kt
│ │ │ ├── ReturnType.kt
│ │ │ └── kotlinpoet
│ │ │ ├── ParameterSpec.kt
│ │ │ ├── TypeName.kt
│ │ │ ├── TypeParameterResolver.kt
│ │ │ └── TypeVariableName.kt
│ └── resources
│ │ └── META-INF
│ │ └── services
│ │ └── com.google.devtools.ksp.processing.SymbolProcessorProvider
│ └── test
│ └── kotlin
│ └── com
│ └── rickclephas
│ └── kmp
│ └── nativecoroutines
│ └── ksp
│ ├── CompilationTests.kt
│ ├── CoroutineScopeProviderTests.kt
│ ├── NativeCoroutinesFunSpecTests.kt
│ └── NativeCoroutinesPropertySpecsTests.kt
├── kotlin-js-store
└── yarn.lock
├── qodana.yaml
├── sample
├── .gitignore
├── Async
│ ├── AsyncFunctionIntegrationTests.swift
│ ├── AsyncResultIntegrationTests.swift
│ ├── AsyncSequenceIntegrationTests.swift
│ ├── AsyncTestUtils.swift
│ ├── ClockAsyncViewModel.swift
│ ├── RandomLettersAsyncViewModel.swift
│ └── SwiftUIAsyncTest.swift
├── Combine
│ ├── ClockCombineViewModel.swift
│ ├── CombineFutureIntegrationTests.swift
│ ├── CombinePublisherIntegrationTests.swift
│ └── RandomLettersCombineViewModel.swift
├── IntegrationTests
│ ├── CompilerIntegrationTests.swift
│ ├── NewMemoryModelIntegrationTests.swift
│ └── TestUtils.swift
├── Issues
│ ├── GH206Tests.swift
│ └── GH219Tests.swift
├── KMPNativeCoroutinesSample.xcodeproj
│ ├── project.pbxproj
│ └── xcshareddata
│ │ └── xcschemes
│ │ ├── iOS App.xcscheme
│ │ ├── macOS App.xcscheme
│ │ ├── tvOS App.xcscheme
│ │ ├── watchOS App WatchKit App (Complication).xcscheme
│ │ ├── watchOS App WatchKit App.xcscheme
│ │ └── watchOS Tests.xcscheme
├── RxSwift
│ ├── ClockRxSwiftViewModel.swift
│ ├── RandomLettersRxSwiftViewModel.swift
│ ├── RxSwiftObservableIntegrationTests.swift
│ └── RxSwiftSingleIntegrationTests.swift
├── UI
│ ├── ClockView.swift
│ ├── ClockViewModel.swift
│ ├── NavigationBarTitle.swift
│ ├── RandomLettersView.swift
│ ├── RandomLettersViewModel.swift
│ └── RootView.swift
├── build.gradle.kts
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── iOS App
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ ├── Info.plist
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ └── SceneDelegate.swift
├── macOS App
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── Preview Content
│ │ └── Preview Assets.xcassets
│ │ │ └── Contents.json
│ └── macOS_App.entitlements
├── settings.gradle.kts
├── shared
│ ├── build.gradle.kts
│ └── src
│ │ ├── appleMain
│ │ └── kotlin
│ │ │ └── com
│ │ │ └── rickclephas
│ │ │ └── kmp
│ │ │ └── nativecoroutines
│ │ │ └── sample
│ │ │ ├── ClockApple.kt
│ │ │ └── issues
│ │ │ └── GH206.kt
│ │ └── commonMain
│ │ └── kotlin
│ │ └── com
│ │ └── rickclephas
│ │ └── kmp
│ │ └── nativecoroutines
│ │ └── sample
│ │ ├── Clock.kt
│ │ ├── RandomLettersGenerator.kt
│ │ ├── issues
│ │ ├── GH206.kt
│ │ └── GH219.kt
│ │ └── tests
│ │ ├── CompilerIntegrationTests.kt
│ │ ├── FlowIntegrationTests.kt
│ │ ├── IntegrationTests.kt
│ │ ├── NewMemoryModelIntegrationTests.kt
│ │ ├── SuspendIntegrationTests.kt
│ │ └── ThreadLockIntegrationTests.kt
├── tvOS App
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ ├── App Icon & Top Shelf Image.brandassets
│ │ │ ├── App Icon - App Store.imagestack
│ │ │ │ ├── Back.imagestacklayer
│ │ │ │ │ ├── Content.imageset
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Front.imagestacklayer
│ │ │ │ │ ├── Content.imageset
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Middle.imagestacklayer
│ │ │ │ │ ├── Content.imageset
│ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ ├── App Icon.imagestack
│ │ │ │ ├── Back.imagestacklayer
│ │ │ │ │ ├── Content.imageset
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Front.imagestacklayer
│ │ │ │ │ ├── Content.imageset
│ │ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Middle.imagestacklayer
│ │ │ │ │ ├── Content.imageset
│ │ │ │ │ └── Contents.json
│ │ │ │ │ └── Contents.json
│ │ │ ├── Contents.json
│ │ │ ├── Top Shelf Image Wide.imageset
│ │ │ │ └── Contents.json
│ │ │ └── Top Shelf Image.imageset
│ │ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ ├── Info.plist
│ └── Preview Content
│ │ └── Preview Assets.xcassets
│ │ └── Contents.json
├── watchOS App WatchKit App
│ ├── Assets.xcassets
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ └── Interface.storyboard
│ └── Info.plist
└── watchOS App WatchKit Extension
│ ├── Assets.xcassets
│ ├── Complication.complicationset
│ │ ├── Circular.imageset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ ├── Extra Large.imageset
│ │ │ └── Contents.json
│ │ ├── Graphic Bezel.imageset
│ │ │ └── Contents.json
│ │ ├── Graphic Circular.imageset
│ │ │ └── Contents.json
│ │ ├── Graphic Corner.imageset
│ │ │ └── Contents.json
│ │ ├── Graphic Extra Large.imageset
│ │ │ └── Contents.json
│ │ ├── Graphic Large Rectangular.imageset
│ │ │ └── Contents.json
│ │ ├── Modular.imageset
│ │ │ └── Contents.json
│ │ └── Utilitarian.imageset
│ │ │ └── Contents.json
│ └── Contents.json
│ ├── ComplicationController.swift
│ ├── ExtensionDelegate.swift
│ ├── HostingController.swift
│ ├── Info.plist
│ └── Preview Content
│ └── Preview Assets.xcassets
│ └── Contents.json
└── settings.gradle.kts
/.github/actions/cache-konan/action.yaml:
--------------------------------------------------------------------------------
1 | name: Cache Konan
2 | description: Caches Konan files
3 | runs:
4 | using: composite
5 | steps:
6 | - uses: actions/cache@v4
7 | with:
8 | path: ~/.konan
9 | key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'gradle/libs.versions.toml') }}
10 | restore-keys: |
11 | ${{ runner.os }}-konan-
12 |
--------------------------------------------------------------------------------
/.github/actions/publish-spm-tag/action.yaml:
--------------------------------------------------------------------------------
1 | name: Publish SPM tag
2 | description: Publishes a SPM tag
3 | inputs:
4 | package-name:
5 | description: The name of the SPM package branch
6 | required: true
7 | version-name:
8 | description: The name of the version tag to publish
9 | required: true
10 | runs:
11 | using: composite
12 | steps:
13 | - shell: bash
14 | run: |
15 | git config --local user.name "GitHub Actions"
16 | git config --local user.email "actions@github.com"
17 | git checkout spm/${{ inputs.package-name }}
18 | git merge --no-edit ${{ inputs.version-name }}
19 | git tag ${{ inputs.version-name }}-spm-${{ inputs.package-name }}
20 | git push origin spm/${{ inputs.package-name }}:spm/${{ inputs.package-name }}
21 | git push origin ${{ inputs.version-name }}-spm-${{ inputs.package-name }}
22 | git checkout -
23 |
--------------------------------------------------------------------------------
/.github/workflows/code-quality.yaml:
--------------------------------------------------------------------------------
1 | name: Qodana
2 | on:
3 | workflow_dispatch:
4 | # pull_request:
5 | # branches:
6 | # - master
7 | jobs:
8 | qodana:
9 | runs-on: ubuntu-latest
10 | permissions:
11 | contents: write
12 | pull-requests: write
13 | checks: write
14 | steps:
15 | - name: Checkout
16 | uses: actions/checkout@v4
17 | with:
18 | ref: ${{ github.event.pull_request.head.sha }}
19 | fetch-depth: 0
20 | - id: get-java-home-11
21 | run: echo "JAVA_HOME_11_X64=$JAVA_HOME_11_X64" >> $GITHUB_OUTPUT
22 | - name: 'Qodana Scan'
23 | uses: JetBrains/qodana-action@v2024.1
24 | with:
25 | args: -v,${{ steps.get-java-home-11.outputs.JAVA_HOME_11_X64 }}:/root/.jdks/jdk11
26 | post-pr-comment: false
27 | env:
28 | QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
29 |
--------------------------------------------------------------------------------
/.github/workflows/release-idea.yaml:
--------------------------------------------------------------------------------
1 | name: Publish a IDEA plugin release
2 | on:
3 | push:
4 | tags:
5 | - 'v[0-9]+.[0-9]+.[0-9]+-idea-[0-9]+.[0-9]+'
6 | - 'v[0-9]+.[0-9]+.[0-9]+-idea-[0-9]+.[0-9]+-EAP-[0-9]+.[0-9]+'
7 | - 'v[0-9]+.[0-9]+.[0-9]+-ALPHA-[0-9]+-idea-[0-9]+.[0-9]+'
8 | - 'v[0-9]+.[0-9]+.[0-9]+-ALPHA-[0-9]+-idea-[0-9]+.[0-9]+-EAP-[0-9]+.[0-9]+'
9 | env:
10 | JAVA_VERSION: '17'
11 | ORG_GRADLE_PROJECT_buildType: IDE_PLUGIN
12 | jobs:
13 | publish-idea-plugin:
14 | runs-on: macos-14
15 | steps:
16 | - name: Checkout
17 | uses: actions/checkout@v4
18 | - name: Setup JDK
19 | uses: actions/setup-java@v4
20 | with:
21 | distribution: 'zulu'
22 | java-version: ${{ env.JAVA_VERSION }}
23 | - name: Setup Gradle
24 | uses: gradle/actions/setup-gradle@v4
25 | with:
26 | cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
27 | - name: Publish IDEA plugin
28 | run: ./gradlew publishPlugin
29 | env:
30 | IDEA_CERTIFICATE_CHAIN: ${{ secrets.IDEA_CERTIFICATE_CHAIN }}
31 | IDEA_PRIVATE_KEY: ${{ secrets.IDEA_PRIVATE_KEY }}
32 | IDEA_PRIVATE_KEY_PASSWORD: ${{ secrets.IDEA_PRIVATE_KEY_PASSWORD }}
33 | IDEA_PUBLISH_TOKEN: ${{ secrets.IDEA_PUBLISH_TOKEN }}
34 |
--------------------------------------------------------------------------------
/.github/workflows/run-kotlin-tests.yaml:
--------------------------------------------------------------------------------
1 | name: Run Kotlin Tests
2 | concurrency:
3 | group: run-kotlin-tests-${{ github.ref }}
4 | cancel-in-progress: true
5 | on:
6 | workflow_dispatch:
7 | workflow_call:
8 | env:
9 | GRADLE_OPTS: -Dorg.gradle.parallel=true -Dorg.gradle.caching=true
10 | jobs:
11 | run-kotlin-tests:
12 | strategy:
13 | fail-fast: false
14 | matrix:
15 | module: [ annotations, compiler, compiler-embeddable, core, gradle-plugin, ksp ]
16 | include:
17 | - java: '17'
18 | - xcode: '15.2'
19 | - module: compiler
20 | buildType: COMPILER_TESTS
21 | name: ${{ matrix.module }}
22 | runs-on: macos-14
23 | steps:
24 | - name: Checkout
25 | uses: actions/checkout@v4
26 | - name: Setup Xcode
27 | uses: maxim-lobanov/setup-xcode@v1
28 | with:
29 | xcode-version: ${{ matrix.xcode }}
30 | - name: Setup JDK
31 | uses: actions/setup-java@v4
32 | with:
33 | distribution: zulu
34 | java-version: ${{ matrix.java }}
35 | - name: Setup Gradle
36 | uses: gradle/actions/setup-gradle@v4
37 | with:
38 | cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
39 | - name: Cache Konan
40 | uses: ./.github/actions/cache-konan
41 | - name: Run tests
42 | env:
43 | ORG_GRADLE_PROJECT_buildType: ${{ matrix.buildType || '' }}
44 | run: ./gradlew :kmp-nativecoroutines-${{ matrix.module }}:check
45 | - name: Archive reports
46 | if: failure()
47 | uses: actions/upload-artifact@v4
48 | with:
49 | name: kmp-nativecoroutines-${{ matrix.module }}-reports
50 | path: '*/build/reports/'
51 |
--------------------------------------------------------------------------------
/.github/workflows/run-swift-tests.yaml:
--------------------------------------------------------------------------------
1 | name: Run Swift Tests
2 | concurrency:
3 | group: run-swift-tests-${{ github.ref }}
4 | cancel-in-progress: true
5 | on:
6 | workflow_dispatch:
7 | workflow_call:
8 | jobs:
9 | run-swift-tests:
10 | strategy:
11 | fail-fast: false
12 | matrix:
13 | platform: [ iOS, macOS, tvOS, watchOS ]
14 | implementation: [ Async, Combine, RxSwift ]
15 | include:
16 | - xcode: '15.2'
17 | - platform: iOS
18 | destination: platform=iOS Simulator,name=iPhone 16 Pro
19 | - platform: macOS
20 | destination: platform=OS X
21 | - platform: tvOS
22 | destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation)
23 | - platform: watchOS
24 | destination: platform=watchOS Simulator,name=Apple Watch Series 10 (46mm)
25 | name: ${{ format('{0} {1}', matrix.implementation, matrix.platform) }}
26 | runs-on: macos-14
27 | steps:
28 | - name: Checkout
29 | uses: actions/checkout@v4
30 | - name: Setup Xcode
31 | uses: maxim-lobanov/setup-xcode@v1
32 | with:
33 | xcode-version: ${{ matrix.xcode }}
34 | - name: Run tests
35 | run: >-
36 | set -o pipefail &&
37 | xcodebuild test
38 | -project KMPNativeCoroutines.xcodeproj
39 | -scheme "KMPNativeCoroutines${{ matrix.implementation }}"
40 | -destination "${{ matrix.destination }}"
41 | | xcbeautify --renderer github-actions
42 |
--------------------------------------------------------------------------------
/.github/workflows/run-tests.yaml:
--------------------------------------------------------------------------------
1 | name: Run Tests
2 | concurrency:
3 | group: run-tests-${{ github.ref }}
4 | cancel-in-progress: true
5 | on:
6 | workflow_dispatch:
7 | pull_request:
8 | types: [opened, synchronize, ready_for_review, reopened]
9 | branches:
10 | - master
11 | - kotlin/**
12 | jobs:
13 | run-kotlin-tests:
14 | if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
15 | name: Kotlin Tests
16 | uses: ./.github/workflows/run-kotlin-tests.yaml
17 | run-swift-tests:
18 | if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
19 | name: Swift Tests
20 | uses: ./.github/workflows/run-swift-tests.yaml
21 | run-integration-tests:
22 | if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
23 | name: Integration Tests
24 | needs:
25 | - run-kotlin-tests
26 | - run-swift-tests
27 | uses: ./.github/workflows/run-integration-tests.yaml
28 | run-idea-tests:
29 | if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
30 | name: IDEA Tests
31 | uses: ./.github/workflows/run-idea-tests.yaml
32 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Datasource local storage ignored files
5 | /dataSources/
6 | /dataSources.local.xml
7 | # Editor-based HTTP Client requests
8 | /httpRequests/
9 |
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | kmp-nativecoroutines
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/kotlinc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/Compiler_Tests.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
11 |
16 |
17 |
18 | false
19 | true
20 | false
21 |
22 |
23 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/Core_Tests.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | false
19 | true
20 | false
21 |
22 |
23 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/KSP_Tests.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | false
19 | true
20 | false
21 |
22 |
23 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/Run_IDE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | true
20 | true
21 | false
22 | false
23 |
24 |
25 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/Verify_Plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | false
19 | true
20 | false
21 | false
22 |
23 |
24 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/KMPNativeCoroutines.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/KMPNativeCoroutines.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/KMPNativeCoroutinesAsync.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'KMPNativeCoroutinesAsync'
3 | s.version = '1.0.0-ALPHA-44'
4 | s.summary = 'Swift library for Kotlin Coroutines with Swift Async/Await'
5 |
6 | s.homepage = 'https://github.com/rickclephas/KMP-NativeCoroutines'
7 | s.license = 'MIT'
8 | s.authors = 'Rick Clephas'
9 |
10 | s.source = {
11 | :git => 'https://github.com/rickclephas/KMP-NativeCoroutines.git',
12 | :tag => 'v' + s.version.to_s
13 | }
14 |
15 | s.swift_versions = ['5.5']
16 | s.ios.deployment_target = '13.0'
17 | s.osx.deployment_target = '10.15'
18 | s.watchos.deployment_target = '6.0'
19 | s.tvos.deployment_target = '13.0'
20 |
21 | s.dependency 'KMPNativeCoroutinesCore', s.version.to_s
22 |
23 | s.source_files = 'KMPNativeCoroutinesAsync/**/*.swift'
24 | end
25 |
--------------------------------------------------------------------------------
/KMPNativeCoroutinesAsync/AsyncError.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AsyncError.swift
3 | // KMPNativeCoroutinesAsync
4 | //
5 | // Created by Rick Clephas on 11/05/2024.
6 | //
7 |
8 | import KMPNativeCoroutinesCore
9 |
10 | /// Awaits the `NativeSuspend` and returns the optional error.
11 | /// - Parameter nativeSuspend: The native suspend function to await.
12 | /// - Returns: The `Error` from the `nativeSuspend`, or `nil`.
13 | public func asyncError(
14 | for nativeSuspend: @escaping NativeSuspend
15 | ) async -> Error? {
16 | do {
17 | try await asyncFunction(for: nativeSuspend)
18 | return nil
19 | } catch {
20 | return error
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/KMPNativeCoroutinesAsync/AsyncResult.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AsyncResult.swift
3 | // KMPNativeCoroutinesAsync
4 | //
5 | // Created by Rick Clephas on 28/06/2021.
6 | //
7 |
8 | import KMPNativeCoroutinesCore
9 |
10 | /// Awaits the `NativeSuspend` and returns the result.
11 | /// - Parameter nativeSuspend: The native suspend function to await.
12 | /// - Returns: The `Result` from the `nativeSuspend`.
13 | public func asyncResult