sourceSets DSL - roll my own

I really like the way sourceSets work, and I would like to apply them in a non-java context. I realise I could apply the java/groovy plugin but I don’t really want the other features that come with it (compile etc). They may be misleading to users.

I’ve been digging through the source but I cant seem to find the implementation. Any steer on how I could roll my own would be greatly appreciated.


You might be interested to look at the new SourceSets DSL used in the C++ plugins, as well as underpinning the Java plugin. Take a look at ‘org.gradle.language.base.LanguageSourceSet’ and it’s various implementations: that might give you some inspiration.

Thanks for the prompt reply I shall go have a look.