I am using compose-jb(jvm only) actively for my pet-project for last year and have a problem that bothers me for a long time.
Please, first of all, validate my idea, maybe I am missing something:
I reuse a lot of stub code in both Compose Previews and unit/integration tests. It is data class filled with stub or random data and also stub implementations of Interfaces.
I really like the idea of using gradle test-fixtures to isolate such stub code, but i can't do it because of Compose Previews.
What i want is to create a separate sourceSet for Previews and add main sourceSet, compose dependencies and test fixtures dependency for it.
I've tried and found out that it's not possible with current Preview task creation logic in the plugin, particularly because of this line.
I could have move some code from plugin to my own custom plugin, but there are a lot of wiring, deep into plugin, i'd have to move Tasks and a lot of stuff with me. That's all because of internal modificators all over the plugin.
What do you think about the idea in general? If it's not only me who can benefit from these type of project organizations, than it's probably a good idea to add the ability to register additional source sets in the plugin?
Hello JetBrains and community!
I am using compose-jb(jvm only) actively for my pet-project for last year and have a problem that bothers me for a long time. Please, first of all, validate my idea, maybe I am missing something:
I reuse a lot of stub code in both Compose Previews and unit/integration tests. It is data class filled with stub or random data and also stub implementations of Interfaces.
I really like the idea of using gradle test-fixtures to isolate such stub code, but i can't do it because of Compose Previews.
What i want is to create a separate sourceSet for Previews and add main sourceSet, compose dependencies and test fixtures dependency for it.
I've tried and found out that it's not possible with current Preview task creation logic in the plugin, particularly because of this line.
I could have move some code from plugin to my own custom plugin, but there are a lot of wiring, deep into plugin, i'd have to move Tasks and a lot of stuff with me. That's all because of
internal
modificators all over the plugin.What do you think about the idea in general? If it's not only me who can benefit from these type of project organizations, than it's probably a good idea to add the ability to register additional source sets in the plugin?