title: Gradle Output Jar has no Main-Class
body: <p>I have the following simple build.gradle file:</p>
  
  <pre><code>apply plugin: 'application'
  apply plugin: 'java'
  
  mainClassName = 'com.kurtis.HelloGradle'
  </code></pre>
  
  <p>And the following single java file located at <code>src/main/java/com/kurtis/HelloGradle.java</code>:</p>
  
  <pre><code>package com.kurtis;
  
  public class HelloGradle {
  
      public static void main(String[] args) {
  
          System.out.println("Hello gradle");
      }
  
  }
  </code></pre>
  
  <p>However, if I run <code>gradle build</code> I get a jar in the <code>build/lib</code> directory that has no main class set. It's manifest file has no <code>Main-Class</code> entry. Why is this?</p>