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.
For example, if now my main class is com.company.myApp, so the packages in each java file are imported in following way: import com.company.myApp.pacakge.
* and when I rename main class to com.company.newName I've also to change imports to: import com.comapny.newName.package.*
.
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.
Is there any way to do it with Gradle?