# Different source directory for build.gradle

**URL:** <https://discuss.gradle.org/t/different-source-directory-for-build-gradle/17001>\
**Category:** Help/Discuss\
**Created:** [April 24, 2016, 4:01pm UTC](https://discuss.gradle.org/t/different-source-directory-for-build-gradle/17001 "2016-04-24T16:01:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arun-gupta](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/arun-gupta/32/5136_2.png) [@arun-gupta](https://discuss.gradle.org/u/arun-gupta)\
**Post date:** [April 24, 2016, 4:01pm UTC](https://discuss.gradle.org/t/different-source-directory-for-build-gradle/17001/1 "2016-04-24T16:01:18Z")

</div>

I’m a newbie to gradle.

Tried changing the the source directory of a Gradle project to a different directory as:

```
sourceSets {
    main {
        java {
            srcDir 'mobycraft/src/src/main/java'
        }
        resources {
            srcDir 'mobycraft/src/src/main/resources'
        }
    }
}

```

as opposed to the default

```
src/main/java

```

This allows me to download the Minecraft Mod Development Kit (MDK) from [http://files.minecraftforge.net/](http://files.minecraftforge.net/) and use the source code from a GitHub project at [https://github.com/AdityaGupta1/mobycraft/](https://github.com/AdityaGupta1/mobycraft/).

Existing workflow (with default src directory) is:

- Unzip MDK
- git clone mobycraft
- Overwrite src from GitHub
- Make changes
- Copy the src back to GitHub (painful)
- git push

The new setup would allow:

- Unzip MDK
- git clone mobycraft
- Make changes and git push

But the new directory is getting recognized. I also tried removing the default src directory that comes with MDK but no luck.

Complete build.gradle is at: [https://gist.github.com/arun-gupta/1230d8180ae2a54e32b4641ec6793473](https://gist.github.com/arun-gupta/1230d8180ae2a54e32b4641ec6793473)

Any idea what might be wrong?

Arun

---

<div class="post-metadata">

**Author:** ![arun-gupta](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/arun-gupta/32/5136_2.png) [@arun-gupta](https://discuss.gradle.org/u/arun-gupta)\
**Post date:** [April 24, 2016, 4:44pm UTC](https://discuss.gradle.org/t/different-source-directory-for-build-gradle/17001/2 "2016-04-24T16:44:28Z")

</div>

Never mind, figured out a solution that works now.

Updated flow at:

> <https://github.com/AdityaGupta1/mobycraft/issues/61>
