Friday, July 15, 2011

ProGuard & AdWhirl

Compilation of an application with AdWhirl & ProGuard throws many warning, for all those AdWhirl adapter libraries not compiled with the application. I found multiple solutions online, some saying just ignore all the warning ProGuard throws:

Don't use it - there's a better solution, ignoring only the problematic parts:
-dontwarn com.adwhirl.adapters.*

Here's the best solution for Proguard & AdWhirl as far as I know:

-dontwarn com.adwhirl.adapters.*

-keep class com.adwhirl.** { *;}
-keep public class com.adwhirl.adapters.AdMobAdapter {*;}
-keep public class com.adwhirl.adapters.ZestAdzAdapter {*;}
-keep public class com.adwhirl.adapters.MillennialAdapter {*;}
-keep public class** {*;}
-keep public class** {*;}
-keep public class** {*;}

-keep public class * extends Android.view.View {
public (android.content.Context);
public (android.content.Context, android.util.AttributeSet);
public (android.content.Context, android.util.AttributeSet, int);
public void set*(...);

-keepclassmembers class *{
public void *(android.view.View);


rdh727 said...

Thanks so much! That was exactly what I needed and saved me from wading through the ProGuard docs.


Larry Hamel said...

Same trick worked for tapjoy

-dontwarn com.tapjoy.*

Thanks for posting!

3dmg said...

Great post, thank you!