0

Could any one give me the exact .pro file of Proguard to shrink Netty (version 4 or 5)?

I have a jar file that uses Netty, I am using Proguard 4.11 to obfuscate and shrink my jar file with Netty into one small jar file. I am not using all of Netty classes, my jar is about 600kb in size and Netty is nearly 2mb and I want to keep the obfuscated jar file less than 1mb.

The problem is that when I execute the obfuscated jar file I get many exceptions related to Netty. I tried to fix it by keeping some Netty classes and members in Proguard but I keep getting other exceptions of missing classes and methods.(I think Netty uses a lot of retrospection).

So how to shrink it with proguard?

bml13
  • 1
  • 1
  • Try this one, I have tested it by my own. https://stackoverflow.com/a/60080208/1800091 – Yugy Feb 05 '20 at 16:37

1 Answers1

0

Maybe you should just not depend on netty-all but on the actual artifacts you need ?

Norman Maurer
  • 23,104
  • 2
  • 33
  • 31
  • 1
    netty-all is about 1.8mb, and even if i only use the needed artifacts like core, codec , transport and handler, those will be around 1.2mb – bml13 Apr 04 '14 at 06:44