Independent project within other gradle project

Hi. I have a little unusual setup where I have a parent project and an independent gradle project inside its directory structure. Something like this:

-ParentProject
— build.gradle
— settings.gradle
— IndependentProject
------build.gradle

I would like to build IndependentProject completely separately to the parent project as they are not related in any way when building. But currently it looks like if I invoke gradle from within IndependentProject it is still going through ParentProject as well. IndependentProject is added to settings.gradle in the parent project though. But just because I want to see them both in Eclipse workspace. I don’t want that dependency visible during build time.

Is there an easy way to tell that IndependentProject not to look up the directory tree during configuration? Other than moving it out altogether to a different directory, which I would like to avoid…

Thanks!

Ok nevermind I found “a solution” 2 min after posting this… You can add settings.gradle file under IndependentProject with content like

include ‘IndependentProject’

seems to have worked.

include ‘IndependentProject’

That doesn’t make sense, since IndependentProject is the root project of that build. You are including another project that doesn’t exist. The settings file needs no content at all if it is a single-project build.