ProGuard does not adapt WebInitParam values
Java class file shrinker, optimizer, obfuscator, and preverifier
Brought to you by:
guardsquare
ProGuard version 6.0.3. I have a class with the following annotation:
@WebServlet( name = "asd", urlPatterns = "/asd/*", loadOnStartup = 1, initParams = { @WebInitParam(name = "services", value = "com.company.SomeService"), })
But then, when I run the app, I get an exception:
java.lang.ClassNotFoundException: com.company.SomeService
Which means that ProGuard did not obfuscate the "value" of the WebInitParam. I have in my configuration:
adaptclassstrings adaptresourcefilenames adaptresourcefilecontents 'META-INF/services/*,WEB-INF/web.xml'
Am I doing something wrong or is this not supported?
Can you try that configuration without the quotes?
Also, you may still need to specify to keep the class to begin with:
Thanks for the response! I'm not sure what you mean by "configuration without the quotes"? What I pasted was Gradle configuration. I also have other settings:
This didn't help:
Only with this configuration it works:
However, this is not what I want - I would like the class to be renamed and the string in the @WebInitParam anotation to be modified to match it. Am I doing something wrong or perphaps this is a bug?