Skip to content

v0.4.0

Latest

Choose a tag to compare

@rmenezes rmenezes released this 26 Sep 21:24
· 2 commits to main since this release
032732d

Streams: AsyncStream → Kotlin Flow

  • A non-async @AndroidBridge protocol requirement returning AsyncStream<T> or AsyncThrowingStream<T, Error> becomes a cold Flow<T> on the generated bridge.
  • New StreamObservation<Element> in SwiftAndroidCodegen: pull-based next() / cancel() over any AsyncSequence.
  • bridge-gen --swift-output-dir / Gradle swiftOutputDir: writes <P>+AndroidStreams.swift (commit it; add the directory to jextract's swiftFilterInclude; run generateSwiftAndroidBridges before jextract).
  • Runtime: observationFlow(open, next, cancel). Completion, first()/take() and collector cancellation all call the Swift cancel() exactly once.
  • Streams are bridged on protocols only. Unsupported shapes are skipped with a warning.

Consumers: generated Swift is unguarded, so every platform that builds the shared package needs this version of the SwiftAndroidCodegen library. Bump the Swift package, the Gradle plugin and the runtime together.