In Compose Multiplatform, is there a way to depend...
# compose
m
In Compose Multiplatform, is there a way to depend on modules for Compose Previews, that should not be published downstream? For example, let's say I have a module with preview test data, as well as preview test themes. Modules are
preview-test-data
,
preview-theme-sunny
and
preview-theme-cloudy
. In our
feature
module, I would like to now import these, and then use functions from those in the previews, like:
Copy code
@Preview
@Composable
fun MyFeaturePreview() {
  Column {
    SunnyTheme { MyFeature(testData) }
    CloudyTheme { MyFeature(testData) }
  }
}
I've tried different variations of
commonMain.runtimeOnly
and
androidRuntimeClasspath
, with no luck. Maybe I'm not seeing things clear, and I should actually just be using
implementation
? Just want to confirm how this is properly done in CMP.