Showkase: doesn't support @Composables with default params
Hopefully this is enough of a stacktrace with beta12:
error: com.airbnb.android.showkase.processor.exceptions.ShowkaseProcessorException: Make sure that the @Composable functions that you annotate with the Preview annotation only have a single parameter that is annotated with @PreviewParameter.
at com.airbnb.android.showkase.processor.logging.ShowkaseValidator.validateComponentElement$showkase_processor(ShowkaseValidator.kt:59)
Supported source version 'RELEASE_8' from annotation processor 'org.jetbrains.kotlin.kapt3.base.ProcessorWrapper' less than -source '11'
at com.airbnb.android.showkase.processor.ShowkaseProcessor.processPreviewAnnotation(ShowkaseProcessor.kt:101)
at com.airbnb.android.showkase.processor.ShowkaseProcessor.processComponentAnnotation(ShowkaseProcessor.kt:75)
com.airbnb.android.showkase.processor.exceptions.ShowkaseProcessorException: Make sure that the @Composable functions that you annotate with the Preview annotation only have a single parameter that is annotated with @PreviewParameter.
at com.airbnb.android.showkase.processor.ShowkaseProcessor.process(ShowkaseProcessor.kt:57)
at com.airbnb.android.showkase.processor.BaseProcessor.internalProcess(BaseProcessor.kt:96)
at com.airbnb.android.showkase.processor.BaseProcessor.process(BaseProcessor.kt:64)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16
@kenyee The stopgap solution would be to just wrap these methods inside a function that doesn’t accept parameters. Definitely not ideal but unblocks you…
As I think more about it, I think it should be straightforward to add this functionality (support for functions with default params). Will keep you posted!