title: Android Proguard settings for Google Maps for Work
body: <p>We recently switched from free google maps library to maps for work. I changed all imports from <code>com.google.android.gms.maps</code> to <code>com.google.android.m4b.maps</code> and imported compiled aar library. We have valid licence.</p>
  
  <p>Only thing I haven't found in docs is proguard settings and I'm having troubles with it. After some research I did a "blind guess" configuration with adding lines:</p>
  
  <pre><code>-dontwarn sun.misc.Unsafe
  -keep class com.google.android.m4b.common.** { *; }
  -keep class com.google.android.m4b.ads.identifier.** { *; }
  -keep class com.google.android.m4b.maps.** { *; }
  -keep class com.google.android.m4b.** { *; }
  -keep class com.google.android.geo.** { *; }
  -keep class android.support.v4.** { *; }
  -keepattributes InnerClasses
  -dontoptimize
  </code></pre>
  
  <p>It compiles somehow (apk is created), but gradle still returns an error:</p>
  
  <pre><code>AGPBI: {"kind":"error","text":"warning: Ignoring InnerClasses attribute for an anonymous inner class","sources":[{}]}
  AGPBI: {"kind":"error","text":"(com.google.android.m4b.maps.ca.a) that doesn\u0027t come with an","sources":[{}]}
  AGPBI: {"kind":"error","text":"associated EnclosingMethod attribute. This class was probably produced by a","sources":[{}]}
  AGPBI: {"kind":"error","text":"compiler that did not target the modern .class file format. The recommended","sources":[{}]}
  AGPBI: {"kind":"error","text":"solution is to recompile the class from source, using an up-to-date compiler","sources":[{}]}
  AGPBI: {"kind":"error","text":"and without specifying any \"-target\" type options. The consequence of ignoring","sources":[{}]}
  AGPBI: {"kind":"error","text":"this warning is that reflective operations on this class will incorrectly","sources":[{}]}
  AGPBI: {"kind":"error","text":"indicate that it is *not* an inner class.","sources":[{}]}
  </code></pre>
  
  <p>Anyway, I don't want to rely on blind guess, and I'm not an proguard expert. Is there an official guide for maps for work?</p>
  
  <p>If not - which lines of above "guessed" proguard configuration do I have to keep, what am I missing, and which lines can I get rid of?</p>