Before Proguard with:
Throwable().getStackTrace()[0].getLineNumber();
I got:
482
After Proguard I got:
41
Which is obviously wrong.
Here is the tested rules to solve this problem :
-keep class java.lang.StackElement
-keepattributes StackTraceElement
-keepattributes SourceFile,LineNumberTable
-keepattributes Signature
-keepattributes InnerClasses,EnclosingMethod
-keepattributes getStackTrace
But it doesn't work. Is there any specific rules to let this piece of code work properly ?