Mike Wei
Mike Wei

Reputation: 347

ProGuard keep class name but change package name

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

Upvotes: 16

Views: 6801

Answers (1)

Eric Lafortune
Eric Lafortune

Reputation: 45668

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

Upvotes: 21

Related Questions