# sourceSets DSL - roll my own

**URL:** <https://discuss.gradle.org/t/sourcesets-dsl-roll-my-own/4931>\
**Category:** Old Forum Archive\
**Created:** [January 14, 2014, 4:13pm UTC](https://discuss.gradle.org/t/sourcesets-dsl-roll-my-own/4931 "2014-01-14T16:13:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sion\_Williams1](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@Sion\_Williams1](https://discuss.gradle.org/u/Sion_Williams1)\
**Post date:** [January 14, 2014, 4:13pm UTC](https://discuss.gradle.org/t/sourcesets-dsl-roll-my-own/4931/1 "2014-01-14T16:13:00Z")

</div>

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.

Thanks

---

<div class="post-metadata">

**Author:** ![daz](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/daz/32/2475_2.png) [@daz](https://discuss.gradle.org/u/daz)\
**Post date:** [January 14, 2014, 6:36pm UTC](https://discuss.gradle.org/t/sourcesets-dsl-roll-my-own/4931/2 "2014-01-14T18:36:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sion\_Williams1](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@Sion\_Williams1](https://discuss.gradle.org/u/Sion_Williams1)\
**Post date:** [January 15, 2014, 1:19pm UTC](https://discuss.gradle.org/t/sourcesets-dsl-roll-my-own/4931/3 "2014-01-15T13:19:00Z")

</div>

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