0% found this document useful (0 votes)
81 views

Proguard Android

This document contains configuration settings for ProGuard, a tool that optimizes and obfuscates Android apps. It includes settings to keep important classes and members, optimize code, and ignore warnings from the support library. Optimization is turned off by default to avoid issues with Dex. The file provides options to keep attributes, activities, services, and other app components as well as preserve native methods, constructors, and enumeration values.

Uploaded by

Adam Hill
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views

Proguard Android

This document contains configuration settings for ProGuard, a tool that optimizes and obfuscates Android apps. It includes settings to keep important classes and members, optimize code, and ignore warnings from the support library. Optimization is turned off by default to avoid issues with Dex. The file provides options to keep attributes, activities, services, and other app components as well as preserve native methods, constructors, and enumeration values.

Uploaded by

Adam Hill
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

# This is a configuration file for ProGuard. # http://proguard.sourceforge.net/index.html#manual/usage.html -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -verbose # Optimization is turned off by default.

Dex does not like code run # through the ProGuard optimize and preverify steps (and performs some # of these optimizations on its own). -dontoptimize -dontpreverify # If you want to enable optimization, you should include the # following: # -optimizations !code/simplification/arithmetic,!code/simplification/cast,!fiel d/*,!class/merging/* # -optimizationpasses 5 # -allowaccessmodification # # Note that you cannot just include these flags in your own # configuration file; if you are including this file, optimization # will be turned off. You'll need to either edit this file, or # duplicate the contents of this file and remove the include of this # file from your project's proguard.config path property. -keepattributes *Annotation* -keep public class * extends android.app.Activity -keep public class * extends android.app.Application -keep public class * extends android.app.Service -keep public class * extends android.content.BroadcastReceiver -keep public class * extends android.content.ContentProvider -keep public class * extends android.app.backup.BackupAgent -keep public class * extends android.preference.Preference -keep public class * extends android.support.v4.app.Fragment -keep public class * extends android.app.Fragment -keep public class com.android.vending.licensing.ILicensingService # For native methods, see http://proguard.sourceforge.net/manual/examples.html#n ative -keepclasseswithmembernames class * { native <methods>; } -keep public class * extends android.view.View { public <init>(android.content.Context); public <init>(android.content.Context, android.util.AttributeSet); public <init>(android.content.Context, android.util.AttributeSet, int); public void set*(...); } -keepclasseswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet); } -keepclasseswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet, int); } -keepclassmembers class * extends android.app.Activity {

public void *(android.view.View); } # For enumeration tml#enumerations -keepclassmembers public static public static } classes, see http://proguard.sourceforge.net/manual/examples.h enum * { **[] values(); ** valueOf(java.lang.String);

-keep class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; } -keepclassmembers class **.R$* { public static <fields>; } # The support library contains references to newer platform versions. # Don't warn about those in case this app is linking against an older # platform version. We know about them, and they are safe. -dontwarn android.support.**

You might also like