Cyker
Cyker

Reputation: 10974

How to keep class with ProGuard

I'm using ProGuard and I want to keep a class with all its methods.

So what's the difference between

-keep class Foo

and

-keep class Foo {*;}

Upvotes: 0

Views: 416

Answers (1)

Eric Lafortune
Eric Lafortune

Reputation: 45686

-keep class Foo makes sure the class Foo (but not necessarily its contents) remains present with that name in the output.

-keep class Foo { *; } makes sure the class Foo and all of it fields and methods remain present with their original names in the output.

See the ProGuard manual > Usage > Keep Options.

Upvotes: 2

Related Questions