How to keep all api interfaces and internal ones that are used like callbacks? I didn't find it there http://proguard.sourceforge.net/manual/examples.html
Asked
Active
Viewed 6,276 times
1 Answers
10
The URL already offer the answer.
A fast but sub-optimal alternative would be simply keeping all interfaces with "-keep interface *".
Update in 2016/3/25 To keep all methods in the Interface
.
-keep interface * {
<methods>;
}
Update in 2017/7/24 The class file of Java8 could store metadata for reflection on method parameters, include Interface
. Proguard v5.3 could keep these metadata with following options:
-keepattributes MethodParameters

Beck Yang
- 3,004
- 2
- 21
- 26
-
I run the testing before I update the answer. It could keep all methods and parameters. If you are talking about the parameter variable names. There is no solution now, because the parameter variable names in not preserving in compilded class too. Please refer [Preserving parameter/argument names in compiled java classes](http://stackoverflow.com/questions/939194/preserving-parameter-argument-names-in-compiled-java-classes) – Beck Yang Mar 28 '16 at 14:39
-
//If you are talking about the parameter variable names. yes thanks, accept – pvllnspk Mar 29 '16 at 11:25