• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * ProGuard -- shrinking, optimization, obfuscation, and preverification
3  *             of Java bytecode.
4  *
5  * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
6  *
7  * This program is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU General Public License as published by the Free
9  * Software Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * This program is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15  * more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  */
21 package proguard;
22 
23 /**
24  * This class provides constants for parsing and writing ProGuard configurations.
25  *
26  * @author Eric Lafortune
27  */
28 class ConfigurationConstants
29 {
30     public static final String OPTION_PREFIX            = "-";
31     public static final String AT_DIRECTIVE             = "@";
32     public static final String INCLUDE_DIRECTIVE        = "-include";
33     public static final String BASE_DIRECTORY_DIRECTIVE = "-basedirectory";
34 
35     public static final String INJARS_OPTION       = "-injars";
36     public static final String OUTJARS_OPTION      = "-outjars";
37     public static final String LIBRARYJARS_OPTION  = "-libraryjars";
38     // Android-added: Add -systemjars option.
39     public static final String SYSTEMJARS_OPTION   = "-systemjars";
40     public static final String RESOURCEJARS_OPTION = "-resourcejars";
41 
42     public static final String KEEP_OPTION                           = "-keep";
43     public static final String KEEP_CLASS_MEMBERS_OPTION             = "-keepclassmembers";
44     public static final String KEEP_CLASSES_WITH_MEMBERS_OPTION      = "-keepclasseswithmembers";
45     public static final String KEEP_NAMES_OPTION                     = "-keepnames";
46     public static final String KEEP_CLASS_MEMBER_NAMES_OPTION        = "-keepclassmembernames";
47     public static final String KEEP_CLASSES_WITH_MEMBER_NAMES_OPTION = "-keepclasseswithmembernames";
48     public static final String INCLUDE_DESCRIPTOR_CLASSES_SUBOPTION  = "includedescriptorclasses";
49     public static final String ALLOW_SHRINKING_SUBOPTION             = "allowshrinking";
50     public static final String ALLOW_OPTIMIZATION_SUBOPTION          = "allowoptimization";
51     public static final String ALLOW_OBFUSCATION_SUBOPTION           = "allowobfuscation";
52     public static final String PRINT_SEEDS_OPTION                    = "-printseeds";
53 
54     public static final String DONT_SHRINK_OPTION         = "-dontshrink";
55     public static final String PRINT_USAGE_OPTION         = "-printusage";
56     public static final String WHY_ARE_YOU_KEEPING_OPTION = "-whyareyoukeeping";
57 
58     public static final String DONT_OPTIMIZE_OPTION                 = "-dontoptimize";
59     public static final String OPTIMIZATIONS                        = "-optimizations";
60     public static final String OPTIMIZATION_PASSES                  = "-optimizationpasses";
61     public static final String ASSUME_NO_SIDE_EFFECTS_OPTION        = "-assumenosideeffects";
62     public static final String ALLOW_ACCESS_MODIFICATION_OPTION     = "-allowaccessmodification";
63     public static final String MERGE_INTERFACES_AGGRESSIVELY_OPTION = "-mergeinterfacesaggressively";
64 
65     public static final String DONT_OBFUSCATE_OPTION                  = "-dontobfuscate";
66     public static final String PRINT_MAPPING_OPTION                   = "-printmapping";
67     public static final String APPLY_MAPPING_OPTION                   = "-applymapping";
68     public static final String OBFUSCATION_DICTIONARY_OPTION          = "-obfuscationdictionary";
69     public static final String CLASS_OBFUSCATION_DICTIONARY_OPTION    = "-classobfuscationdictionary";
70     public static final String PACKAGE_OBFUSCATION_DICTIONARY_OPTION  = "-packageobfuscationdictionary";
71     public static final String OVERLOAD_AGGRESSIVELY_OPTION           = "-overloadaggressively";
72     public static final String USE_UNIQUE_CLASS_MEMBER_NAMES_OPTION   = "-useuniqueclassmembernames";
73     public static final String DONT_USE_MIXED_CASE_CLASS_NAMES_OPTION = "-dontusemixedcaseclassnames";
74     public static final String KEEP_PACKAGE_NAMES_OPTION              = "-keeppackagenames";
75     public static final String FLATTEN_PACKAGE_HIERARCHY_OPTION       = "-flattenpackagehierarchy";
76     public static final String REPACKAGE_CLASSES_OPTION               = "-repackageclasses";
77     public static final String DEFAULT_PACKAGE_OPTION                 = "-defaultpackage";
78     public static final String KEEP_ATTRIBUTES_OPTION                 = "-keepattributes";
79     public static final String KEEP_PARAMETER_NAMES_OPTION            = "-keepparameternames";
80     public static final String RENAME_SOURCE_FILE_ATTRIBUTE_OPTION    = "-renamesourcefileattribute";
81     public static final String ADAPT_CLASS_STRINGS_OPTION             = "-adaptclassstrings";
82     public static final String ADAPT_RESOURCE_FILE_NAMES_OPTION       = "-adaptresourcefilenames";
83     public static final String ADAPT_RESOURCE_FILE_CONTENTS_OPTION    = "-adaptresourcefilecontents";
84 
85     public static final String DONT_PREVERIFY_OPTION = "-dontpreverify";
86     public static final String MICRO_EDITION_OPTION  = "-microedition";
87 
88     public static final String VERBOSE_OPTION                                    = "-verbose";
89     public static final String DONT_NOTE_OPTION                                  = "-dontnote";
90     public static final String DONT_WARN_OPTION                                  = "-dontwarn";
91     public static final String IGNORE_WARNINGS_OPTION                            = "-ignorewarnings";
92     public static final String PRINT_CONFIGURATION_OPTION                        = "-printconfiguration";
93     public static final String DUMP_OPTION                                       = "-dump";
94     public static final String SKIP_NON_PUBLIC_LIBRARY_CLASSES_OPTION            = "-skipnonpubliclibraryclasses";
95     public static final String DONT_SKIP_NON_PUBLIC_LIBRARY_CLASSES_OPTION       = "-dontskipnonpubliclibraryclasses";
96     public static final String DONT_SKIP_NON_PUBLIC_LIBRARY_CLASS_MEMBERS_OPTION = "-dontskipnonpubliclibraryclassmembers";
97     public static final String TARGET_OPTION                                     = "-target";
98     public static final String KEEP_DIRECTORIES_OPTION                           = "-keepdirectories";
99     public static final String FORCE_PROCESSING_OPTION                           = "-forceprocessing";
100 
101     public static final String ANY_FILE_KEYWORD            = "**";
102 
103     public static final String ANY_ATTRIBUTE_KEYWORD       = "*";
104     public static final String ATTRIBUTE_SEPARATOR_KEYWORD = ",";
105 
106     public static final String JAR_SEPARATOR_KEYWORD   = System.getProperty("path.separator");
107 
108     public static final char OPEN_SYSTEM_PROPERTY  = '<';
109     public static final char CLOSE_SYSTEM_PROPERTY = '>';
110 
111     public static final String ANNOTATION_KEYWORD         = "@";
112     public static final String NEGATOR_KEYWORD            = "!";
113     public static final String CLASS_KEYWORD              = "class";
114     public static final String ANY_CLASS_KEYWORD          = "*";
115     public static final String ANY_TYPE_KEYWORD           = "***";
116     public static final String IMPLEMENTS_KEYWORD         = "implements";
117     public static final String EXTENDS_KEYWORD            = "extends";
118     public static final String OPEN_KEYWORD               = "{";
119     public static final String ANY_CLASS_MEMBER_KEYWORD   = "*";
120     public static final String ANY_FIELD_KEYWORD          = "<fields>";
121     public static final String ANY_METHOD_KEYWORD         = "<methods>";
122     public static final String OPEN_ARGUMENTS_KEYWORD     = "(";
123     public static final String ARGUMENT_SEPARATOR_KEYWORD = ",";
124     public static final String ANY_ARGUMENTS_KEYWORD      = "...";
125     public static final String CLOSE_ARGUMENTS_KEYWORD    = ")";
126     public static final String SEPARATOR_KEYWORD          = ";";
127     public static final String CLOSE_KEYWORD              = "}";
128 }
129