Hi guys, I’m publishing a multi-platform library (mainly JVM, browser and nodejs), but I also want several artifacts (flavors) per platform, because I want users to be able to pick different modules to avoid unnecessary 3rd party deps.
My current approach is having multiple subprojects, some of which are pure JS, some pure JVM, and some multiplatform, with inter-dependencies, but it’s a bit of a hassle.
I wonder if there is a better way using many Gradle source sets instead. Maybe just declaring several times the same target with different names for different “flavors” and different sets of deps, but I can’t find any example online, any pointers?
If you need more details, here’s my project:
https://github.com/joffrey-bion/krossbow