ResourceMover is a command line tool that helps bulk manage resources in an Android project.
- Clone project
- Build CLI jar using
./gradlew publishBinary. This will build the jar into./libin this project's directory - Copy the
resource-mover.gradlescript into your project's root directory - Update the
resourceMoverBinaryPathin the copiedresource-mover.gradleto point to the jar built in step 2 - Apply the script in your root
build.gradleusingapply from: "resource-mover.gradle"
To move resources from one module in your android project to another run the following command. Note this will only move resources that are only referenced by the "toModule". Resources referenced by other modules will remain untouched:
./gradlew moveResources -PfromModule="Example-From-Module-Name" -PtoModule="Example-To-Module-Name"`
To remove resources from a module that are not referenced anywhere in code run:
./gradlew removeResources -PfromModule="Example-Module-Name"