I’m working on a plugin which wraps an external toolchain. The toolchain produces a number of different binaries depending on the platform and configuration. It has various inputs, sources and other assets, but doesn’t build them individually. It takes a project file, and produces the binaries. However, it’s pretty slow and complex, so I avoid calling it when I can detect that inputs and outputs are up to date. This works fairly well in a completely custom plugin which isn’t using the software model per se, but I always like to follow best practices when possible, both to benefit from existing work, and to ease the learning curve of users/developers.
To perhaps explain a little better, think of this as an external tool like “make”, or “ant”, which I want to call only when I’ve already determined that it’s out of date, and which generates a set of different outputs, that I may or may not want to perform additional tasks on.
So my question is, given this scenario, does it make sense to use the software model, creating new ComponentSpecs, BinarySpecs, SourceSets, etc. for this kind of setup that doesn’t act on source sets in the same way as java, c++, and so on? Or is it better to just custom build this? A custom LanguageSourceSet wouldn’t really be that, as it’ll contain both assets and code, all processed by the magic black box.
One additional reason I lean towards the software model, is that I do want to use buildTypes, flavors, platforms, and so on, and I’d rather not re-implement such “basic” things if I can avoid it.