We recently switched from free google maps library to maps for work. I changed all imports from com.google.android.gms.maps
to com.google.android.m4b.maps
and imported compiled aar library. We have valid licence.
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:
-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
It compiles somehow (apk is created), but gradle still returns an error:
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":[{}]}
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?
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?