title: Java compile error: package does not exist
body: <p>In my workspace (wsPrivate) I have 3 gradle projects.</p>
  
  <ul>
  <li>Hangman  </li>
  <li>PixelView  </li>
  <li>Reports</li>
  </ul>
  
  <p>Projects PixelView and Reports compile fine. However Hangman uses those both projects and some how can't find the packages while compiling.<br>
  See the error below (which pop up during compiling Hangman):</p>
  
  <pre><code>D:\_wsGitlab\wsPrivate\Hangman\src\main\java\game\core\Game.java:10: error: package hangman does not exist
  import hangman.Messages;
                ^
  D:\_wsGitlab\wsPrivate\Hangman\src\main\java\game\core\Game.java:13: error: package viewer does not exist
  import viewer.Box;
               ^
  D:\_wsGitlab\wsPrivate\Hangman\src\main\java\game\core\Game.java:14: error: package viewer.figures.boxes does not exist
  import viewer.figures.boxes.Borders;
  </code></pre>
  
  <p>I've read almost every bit of info I could find about classpaths and how to fix this [in my opinion] "scope-problem" as also I've tried multiple solutions but I think I'm making it worse.
  The program does work fine without compiling in eclipse, so I assume the code withing is correct.</p>
  
  <p>I'm now like 3 days stuck on this so if anyone could explain to me where I'm driving of the road that would be really nice. If anymore information is wanted: just ask ;)</p>
  
  <p>So this is basically what I have at the moment: </p>
  
  <p>Layout of my packages and added library:</p>
  
  <p><a href="https://i.stack.imgur.com/MPciU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MPciU.png" alt="layout of my packages and added library"></a></p>
  
  <p>Custom library that I've added to Hangman:</p>
  
  <p><a href="https://i.stack.imgur.com/in0iy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/in0iy.png" alt="Custom library that I&#39;ve added to Hangman"></a></p>
  
  <p>Projects on build path of project Hangman:</p>
  
  <p><a href="https://i.stack.imgur.com/YEvXE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YEvXE.png" alt="Projects on build path of project Hangman"></a></p>
  
  <p>Order and export of project Hangman:</p>
  
  <p><a href="https://i.stack.imgur.com/BeoW7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BeoW7.png" alt="Order and export of project Hangman"></a></p>
  
  <p>Other two projects that are referenced (pixelview / reports):</p>
  
  <p><a href="https://i.stack.imgur.com/OS8Zk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OS8Zk.png" alt="Other two projects that are referenced"></a></p>
  
  <p>Last but not least my <code>build.gradle</code>:</p>
  
  <pre><code>apply plugin: 'application'
  
  mainClassName = "game.core.Game"
  
  repositories {
      jcenter()
  }
  
  dependencies {
      compile 'org.apache.commons:commons-math3:3.6.1'
      implementation 'com.google.guava:guava:23.0'
      testImplementation 'junit:junit:4.12'
  }
  
  jar {
      baseName = 'HangmanGame'
      version = '2.00.0'
      manifest {
          attributes(
          'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
          'Main-Class': 'game.core.Game'
          )
      }
  }
  </code></pre>