ProGuard keep class name but change package name

java, proguard

Solution

ProGuard doesn't have a standard option to rename packages yet keep their simple class names.

You could create a ProGuard mapping file manually, with lines like:

com.example.MyClass -> a.MyClass:
com.example.MyOtherClass -> a.MyOtherClass:

You can then use the option `-applymapping mapping.txt`

Problem

want to change package name but need keep Class Name not change. any idea?

Original source