title: Unable to find property file in classpath for gradle dist build
body: <p>(new to gradle) </p>
  
  <p>Java Program reads property files from classpath using the classloader getResourceAsStream function. The program runs in eclipse without errors. Executing the batch file generated from the distZip gradle task results in the below error</p>
  
  <pre><code>Exception in thread "main" java.io.FileNotFoundException: property file 'prop.properties' not found in the classpath
      at com.foo.bar.fb.utility.PropResourceCache.getProperties(PropResourceCache.java:26)
      at com.foo.bar.fb.offline.RunOfflineProcess.main(RunOfflineProcess.java:40) Press any key to continue . . .
  </code></pre>
  
  <p>I assume this is due to the properties not being included in the manifest file. Is there a way to include all property files in the program's src/main/resources/Properties directory? Whats the best practice? </p>
  
  <p>gradle build entry</p>
  
  <pre><code>jar.doFirst{
          manifest {
              attributes(
                  "Manifest-Version"    : "1.0",
                  "Built-By"            : System.getProperty('user.name'),
                  "Built-Date"          : new Date(),
                  "Main-Class"          : mainClassName,
                  "Class-Path"          : configurations.runtime.collect{ "lib/"+it.getName() }.join(' ') 
              )
          }
  }
  </code></pre>
  
  <p>accessing property files</p>
  
  <pre><code>    public Properties getProperties(String propFileName) throws IOException {
      String name = File.pathSeparator+"Properties"+File.separator+propFileName;
      Properties props = new Properties();
      InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(name);
  
      if (inputStream == null) {
          throw new FileNotFoundException("property file '" + name
              + "' not found in the classpath");
      }
      props.load(inputStream);
  
      return props;
  }
  </code></pre>