title: Rename classes in gradle
body: <p>I am preparing a Gradle build script for my Android application. Before build task starts I've to change main class name and thus change imports in each *.java file. </p>
  
  <p>For example, if now my main class is <em>com.company.myApp</em>, so the packages in each java file are imported in following way: <code>import com.company.myApp.pacakge.</code>* and when I rename main class to <em>com.company.newName</em> I've also to change imports to: import <code>com.comapny.newName.package.*</code>.</p>
  
  <p>I am beginner with Gradle but I was trying to find information about equivalent of replace() function and I found shadow plugin but it works on JAR files. There is one more soultion which is using ReplaceTokens but it works with tokens and class name is not a token like.</p>
  
  <p>Is there any way to do it with Gradle?</p>