Each time when a module needs enabled compose I have to do the following steps:
- android.buildFeatures.compose = true
- add a set of dependencies androidx.compose.xxx
I have a common build script and now I want to simplify usage of compose in my modules.
I would like to simplify that process by automatically add all compose dependencies if child module enables compose by android.buildFeatures.compose = true
How can I do it?
CodePudding user response:
Something like this is done in the Now in android example app. They are using gradle plugins to do that, you can see common logic for all jetpack compose modules here: AndroidCompose.kt. There is a readme that explains it pretty well.