title: IntelliJ / Gradle - composite build project - how to import from different module?
body: <p>I'm new to Java and am currently trying to build a cucumber / selenium project in IntelliJ that contains two modules: A library project containing page definitions, and a test project that contains the cucumber features and step definitions that talk to those page definitions. The idea is that the page definitions are a shared resource, and the tests are specific to different projects / groups. Both modules are at the same level underneath the parent project. The build is using Gradle, and the <code>settings.gradle</code> file for the parent looks as follows:</p>
  
  <pre><code>rootProject.name = 'composite-builds'
  includeBuild 'libraryproject'
  includeBuild 'testproject'
  </code></pre>
  
  <p>Using Gradle <code>includeBuild</code> on the parent project works fine and the whole project imports. However I am having no luck using the library project in my import statements in the test project. It consistently returns me these kinds of error: <code>java: package libraryproject.pageFactory.examplePages does not exist</code> and is clearly not seeing the library module.</p>
  
  <p>What do I need to do / add in order for the test project to recognise the library project? I did try to also add the <code>includeBuild</code> statement in the <code>settings.gradle</code> for the test project but this made no difference.</p>
  
  <p>The library can be found <a href="https://github.com/HesterLyonsMaru/composite-builds" rel="nofollow noreferrer">here</a></p>
  
  <p>Update: the real reason that I cannot see the modules from the library project is that they were held in the test folder, not main.</p>