title: How can I obfuscate only com.foo.* and com.bar.* (ProGuard)?
body: <p>I want to obfuscate only some packages:</p>
  
  <pre><code>com.foo.*
  com.bar.*
  </code></pre>
  
  <p>I have tried</p>
  
  <pre><code>-keepclasseswithmembers class **, !com.foo.**, !com.bar.** { *; }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>-keepclasseswithmembers class !com.foo.** { *; }
  -keepclasseswithmembers class !com.bar.** { *; }
  </code></pre>
  
  <p>In both cases the classes from com.foo.* and com.bar.* was <em>NOT</em> obfuscated. </p>