Refactor code so that variant artifacts are derived from the source set
This commit refactors the code so that, from a source set, we can find
the output directories which are generated by compile tasks. This allows
us to generate a "lazy" variant which would contain all the classes of
all languages, without having to explicitly declare it.