Skip to content

Add optional automatic SKIE StateFlow discovery #2

Description

@sonmbol

Goal

Add optional build-time discovery of public SKIE StateFlow properties so generated Kotlin ViewModels can use native-looking SwiftUI declarations without repeating state key paths.

Scope

  • Generate KMPAutomaticallyObservable conformances from the compiled KMP framework symbol graph.
  • Support no-state KMPStateObject and KMPObservedObject declarations for generated conformances.
  • Preserve all explicit state:, states:, and adapter APIs when generation is not enabled.
  • Prevent empty explicit state lists from silently creating an unobserved model.
  • Integrate the generated source into the DailyPulse Xcode navigator and Compile Sources phase.
  • Declare the generated file as a Run Script output and fail the build when Gradle or generation fails.
  • Document setup, limitations, and manual fallback behavior.
  • Verify clean-checkout generation and both wrapper types.

Acceptance criteria

  • A missing generated file is created before Swift compilation on a clean build.
  • The generated folder/file is referenced by the Xcode project and application target.
  • @KMPStateObject private var model = Model() works for generated SKIE conformances.
  • KMPObservedObject(wrappedValue: model) works for generated SKIE conformances.
  • Explicit observation remains fully functional without running the generator.
  • Package tests and the DailyPulse simulator build pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions