What is the best way to include a given class only in debug compiles? For example, a mock object for...
c
What is the best way to include a given class only in debug compiles? For example, a mock object for the purpose of
@Preview
?
😶 3
c
I was asking in here because I figured Kotlin might have the ability to conditionalize the compile for parts of the file, like in Swift:
Copy code
#if DEBUG
struct SomeView_Previews: PreviewProvider {
    …
}
#endif
Or even a class annotation, because you often do want previews in the same file as the view itself, but it looks like that is not possible