title: Gradle: Neither path nor baseDir may be null or empty string
body: <p>I am trying to use ProGuard in my Gradle script to obfuscate my code everytime I build, however I am running into the following error:</p>
  
  <pre><code>FAILURE: Build failed with an exception.
  
  * What went wrong:
  Neither path nor baseDir may be null or empty string. path='null' basedir='/Users/hassansyyid/Workspace/Random/Launcher/launcher'
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  
  BUILD FAILED
  
  Total time: 1.888 secs
  </code></pre>
  
  <p>Here is my build.gradle:</p>
  
  <pre><code>import proguard.gradle.ProGuardTask
  
  apply plugin: 'com.github.johnrengelman.shadow'
  
  buildscript {
      repositories {
          mavenCentral()
      }
  
      dependencies {
          classpath 'net.sf.proguard:proguard-gradle:5.3.1'
      }
  }
  
  jar {
      manifest {
          attributes("Main-Class": "com.skcraft.launcher.Launcher")
      }
  }
  
  dependencies {
      compile 'org.projectlombok:lombok:1.12.2'
      compile 'com.fasterxml.jackson.core:jackson-databind:2.3.0'
      compile 'commons-lang:commons-lang:2.6'
      compile 'commons-io:commons-io:1.2'
      compile 'com.google.guava:guava:15.0'
      compile 'com.beust:jcommander:1.32'
      compile 'com.miglayout:miglayout:3.7.4'
      compile 'com.google.code.findbugs:jsr305:3.0.0'
  }
  
  processResources {
      filesMatching('**/*.properties') {
          filter {
              it.replace('${project.version}', project.version)
          }
      }
  }
  
  task obfuscate(type: proguard.gradle.ProGuardTask) {
    configuration 'proguard.txt'
  
    injars "${buildDir}/libs/launcher-${version}.jar"
    outjars "${buildDir}/libs/launcher-${version}-obf.jar"
  
    libraryjars configurations.compile.find { it.name.startsWith("lombok") }
    libraryjars configurations.compile.find { it.name.startsWith("jackson-databind") }
    libraryjars configurations.compile.find { it.name.startsWith("jackson-core") }
    libraryjars configurations.compile.find { it.name.startsWith("jackson-annotation") }
    libraryjars configurations.compile.find { it.name.startsWith("crypto") }
    libraryjars configurations.compile.find { it.name.startsWith("guava") }
    libraryjars configurations.compile.find { it.name.startsWith("jcommander") }
    libraryjars configurations.compile.find { it.name.startsWith("miglayout") }
    libraryjars configurations.compile.find { it.name.startsWith("jsr305") }
    libraryjars configurations.compile.find { it.name.startsWith("commons-io") }
    libraryjars configurations.compile.find { it.name.startsWith("commons-lang") }
  }
  
  shadowJar {
      dependencies {
          exclude(dependency('org.projectlombok:lombok'))
      }
  }
  
  build.dependsOn(shadowJar)
  build.dependsOn(obfuscate)
  </code></pre>
  
  <p>The only information I figured out about the issue is that it is related to the <code>obfuscate</code> task. I confirmed this by commenting out <code>build.dependsOn(obfuscate)</code> and the build was successful.</p>
  
  <p>I looked up the error but was unable to find any useful information. Also, I am running Gradle <code>3.1</code>, the latest Gradle build.</p>
  
  <p>My proguard.txt:</p>
  
  <pre><code># Include java runtime classes
  -libraryjars  &lt;java.home&gt;/lib/rt.jar
  
  # Output a source map file
  -printmapping proguard.map
  
  # Keep filenames and line numbers
  -keepattributes SourceFile, LineNumberTable
  
  # Disable certain proguard optimizations which remove stackframes (same as Android defaults)
  -optimizations !method/inlining/*
  
  -keep public class * {
      public protected *;
  }
  
  -keepclassmembernames class * {
      java.lang.Class class$(java.lang.String);
      java.lang.Class class$(java.lang.String, boolean);
  }
  
  -keepclasseswithmembernames class * {
      native &lt;methods&gt;;
  }
  
  -keepclassmembers enum * {
      public static **[] values();
      public static ** valueOf(java.lang.String);
  }
  
  -keepclassmembers class * implements java.io.Serializable {
      static final long serialVersionUID;
      private static final java.io.ObjectStreamField[] serialPersistentFields;
      private void writeObject(java.io.ObjectOutputStream);
      private void readObject(java.io.ObjectInputStream);
      java.lang.Object writeReplace();
      java.lang.Object readResolve();
  }
  </code></pre>
  
  <p>Thanks in advance for any help!</p>