sometsome 3.10.49 → 3.10.50.36
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- metadata +13 -963
- data/lib/hola.rb +0 -5
- data/lib/proguard4.7/README +0 -33
- data/lib/proguard4.7/bin/proguard.bat +0 -14
- data/lib/proguard4.7/bin/proguard.sh +0 -11
- data/lib/proguard4.7/bin/proguardgui.bat +0 -14
- data/lib/proguard4.7/bin/proguardgui.sh +0 -15
- data/lib/proguard4.7/bin/retrace.bat +0 -14
- data/lib/proguard4.7/bin/retrace.sh +0 -12
- data/lib/proguard4.7/build/build.sh +0 -94
- data/lib/proguard4.7/build/build.xml +0 -171
- data/lib/proguard4.7/build/makefile +0 -94
- data/lib/proguard4.7/docs/FAQ.html +0 -253
- data/lib/proguard4.7/docs/GPL.html +0 -406
- data/lib/proguard4.7/docs/GPL_exception.html +0 -56
- data/lib/proguard4.7/docs/acknowledgements.html +0 -76
- data/lib/proguard4.7/docs/alternatives.html +0 -699
- data/lib/proguard4.7/docs/checkmark.gif +0 -0
- data/lib/proguard4.7/docs/downloads.html +0 -623
- data/lib/proguard4.7/docs/drop1.gif +0 -0
- data/lib/proguard4.7/docs/drop2.gif +0 -0
- data/lib/proguard4.7/docs/drop3.gif +0 -0
- data/lib/proguard4.7/docs/favicon.ico +0 -0
- data/lib/proguard4.7/docs/feedback.html +0 -120
- data/lib/proguard4.7/docs/index.html +0 -92
- data/lib/proguard4.7/docs/license.html +0 -60
- data/lib/proguard4.7/docs/main.html +0 -102
- data/lib/proguard4.7/docs/manual/ant.html +0 -634
- data/lib/proguard4.7/docs/manual/attention.gif +0 -0
- data/lib/proguard4.7/docs/manual/examples.html +0 -1504
- data/lib/proguard4.7/docs/manual/gui.html +0 -479
- data/lib/proguard4.7/docs/manual/index.html +0 -51
- data/lib/proguard4.7/docs/manual/introduction.html +0 -173
- data/lib/proguard4.7/docs/manual/limitations.html +0 -69
- data/lib/proguard4.7/docs/manual/optimizations.html +0 -172
- data/lib/proguard4.7/docs/manual/refcard.html +0 -486
- data/lib/proguard4.7/docs/manual/retrace/examples.html +0 -345
- data/lib/proguard4.7/docs/manual/retrace/index.html +0 -37
- data/lib/proguard4.7/docs/manual/retrace/introduction.html +0 -79
- data/lib/proguard4.7/docs/manual/retrace/usage.html +0 -127
- data/lib/proguard4.7/docs/manual/sections.html +0 -60
- data/lib/proguard4.7/docs/manual/style.css +0 -105
- data/lib/proguard4.7/docs/manual/troubleshooting.html +0 -729
- data/lib/proguard4.7/docs/manual/usage.html +0 -1243
- data/lib/proguard4.7/docs/manual/wtk.html +0 -70
- data/lib/proguard4.7/docs/quality.html +0 -56
- data/lib/proguard4.7/docs/results.html +0 -170
- data/lib/proguard4.7/docs/saikoalogo.png +0 -0
- data/lib/proguard4.7/docs/screenshot_console.gif +0 -0
- data/lib/proguard4.7/docs/screenshot_console_small.gif +0 -0
- data/lib/proguard4.7/docs/screenshot_gui1.gif +0 -0
- data/lib/proguard4.7/docs/screenshot_gui2.gif +0 -0
- data/lib/proguard4.7/docs/screenshot_gui3.gif +0 -0
- data/lib/proguard4.7/docs/screenshot_gui4.gif +0 -0
- data/lib/proguard4.7/docs/screenshot_gui5.gif +0 -0
- data/lib/proguard4.7/docs/screenshot_gui6.gif +0 -0
- data/lib/proguard4.7/docs/screenshot_gui7.gif +0 -0
- data/lib/proguard4.7/docs/screenshot_gui8.gif +0 -0
- data/lib/proguard4.7/docs/screenshots.html +0 -67
- data/lib/proguard4.7/docs/screenshots_gui_small.gif +0 -0
- data/lib/proguard4.7/docs/sections.html +0 -64
- data/lib/proguard4.7/docs/sflogo.png +0 -0
- data/lib/proguard4.7/docs/steel.gif +0 -0
- data/lib/proguard4.7/docs/style.css +0 -223
- data/lib/proguard4.7/docs/testimonials.html +0 -133
- data/lib/proguard4.7/docs/title.gif +0 -0
- data/lib/proguard4.7/docs/title.html +0 -17
- data/lib/proguard4.7/examples/android.pro +0 -149
- data/lib/proguard4.7/examples/annotations/examples.pro +0 -60
- data/lib/proguard4.7/examples/annotations/examples/Applet.java +0 -22
- data/lib/proguard4.7/examples/annotations/examples/Application.java +0 -20
- data/lib/proguard4.7/examples/annotations/examples/Bean.java +0 -56
- data/lib/proguard4.7/examples/annotations/examples/NativeCallBack.java +0 -44
- data/lib/proguard4.7/examples/annotations/lib/annotations.jar +0 -0
- data/lib/proguard4.7/examples/annotations/lib/annotations.pro +0 -118
- data/lib/proguard4.7/examples/annotations/src/proguard/annotation/Keep.java +0 -18
- data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepApplication.java +0 -18
- data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepClassMemberNames.java +0 -18
- data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepClassMembers.java +0 -18
- data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepGettersSetters.java +0 -18
- data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepImplementations.java +0 -18
- data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepName.java +0 -18
- data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepPublicClassMemberNames.java +0 -18
- data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepPublicClassMembers.java +0 -18
- data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepPublicGettersSetters.java +0 -18
- data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepPublicImplementations.java +0 -18
- data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepPublicProtectedClassMemberNames.java +0 -18
- data/lib/proguard4.7/examples/annotations/src/proguard/annotation/KeepPublicProtectedClassMembers.java +0 -19
- data/lib/proguard4.7/examples/ant/android-8.xml +0 -177
- data/lib/proguard4.7/examples/ant/applets.xml +0 -88
- data/lib/proguard4.7/examples/ant/applications1.xml +0 -15
- data/lib/proguard4.7/examples/ant/applications2.xml +0 -74
- data/lib/proguard4.7/examples/ant/applications3.xml +0 -98
- data/lib/proguard4.7/examples/ant/library.xml +0 -102
- data/lib/proguard4.7/examples/ant/midlets.xml +0 -52
- data/lib/proguard4.7/examples/ant/proguard.xml +0 -78
- data/lib/proguard4.7/examples/ant/servlets.xml +0 -88
- data/lib/proguard4.7/examples/applets.pro +0 -69
- data/lib/proguard4.7/examples/applications.pro +0 -75
- data/lib/proguard4.7/examples/dictionaries/compact.txt +0 -18
- data/lib/proguard4.7/examples/dictionaries/keywords.txt +0 -58
- data/lib/proguard4.7/examples/dictionaries/shakespeare.txt +0 -23
- data/lib/proguard4.7/examples/dictionaries/windows.txt +0 -209
- data/lib/proguard4.7/examples/library.pro +0 -79
- data/lib/proguard4.7/examples/midlets.pro +0 -67
- data/lib/proguard4.7/examples/proguard.pro +0 -57
- data/lib/proguard4.7/examples/proguardall.pro +0 -62
- data/lib/proguard4.7/examples/proguardgui.pro +0 -50
- data/lib/proguard4.7/examples/retrace.pro +0 -43
- data/lib/proguard4.7/examples/scala.pro +0 -132
- data/lib/proguard4.7/examples/servlets.pro +0 -70
- data/lib/proguard4.7/lib/proguard.jar +0 -0
- data/lib/proguard4.7/lib/proguardgui.jar +0 -0
- data/lib/proguard4.7/lib/retrace.jar +0 -0
- data/lib/proguard4.7/src/proguard/ArgumentWordReader.java +0 -111
- data/lib/proguard4.7/src/proguard/ClassPath.java +0 -94
- data/lib/proguard4.7/src/proguard/ClassPathEntry.java +0 -282
- data/lib/proguard4.7/src/proguard/ClassSpecification.java +0 -259
- data/lib/proguard4.7/src/proguard/ClassSpecificationVisitorFactory.java +0 -503
- data/lib/proguard4.7/src/proguard/Configuration.java +0 -328
- data/lib/proguard4.7/src/proguard/ConfigurationConstants.java +0 -123
- data/lib/proguard4.7/src/proguard/ConfigurationParser.java +0 -1285
- data/lib/proguard4.7/src/proguard/ConfigurationWriter.java +0 -651
- data/lib/proguard4.7/src/proguard/DataEntryReaderFactory.java +0 -141
- data/lib/proguard4.7/src/proguard/DataEntryWriterFactory.java +0 -150
- data/lib/proguard4.7/src/proguard/DescriptorKeepChecker.java +0 -169
- data/lib/proguard4.7/src/proguard/DuplicateClassPrinter.java +0 -63
- data/lib/proguard4.7/src/proguard/FileWordReader.java +0 -55
- data/lib/proguard4.7/src/proguard/FullyQualifiedClassNameChecker.java +0 -191
- data/lib/proguard4.7/src/proguard/GPL.java +0 -197
- data/lib/proguard4.7/src/proguard/Initializer.java +0 -424
- data/lib/proguard4.7/src/proguard/InputReader.java +0 -233
- data/lib/proguard4.7/src/proguard/KeepClassMemberChecker.java +0 -87
- data/lib/proguard4.7/src/proguard/KeepClassSpecification.java +0 -137
- data/lib/proguard4.7/src/proguard/LineWordReader.java +0 -74
- data/lib/proguard4.7/src/proguard/MANIFEST.MF +0 -2
- data/lib/proguard4.7/src/proguard/MemberSpecification.java +0 -114
- data/lib/proguard4.7/src/proguard/OutputWriter.java +0 -296
- data/lib/proguard4.7/src/proguard/ParseException.java +0 -51
- data/lib/proguard4.7/src/proguard/ProGuard.java +0 -512
- data/lib/proguard4.7/src/proguard/SeedPrinter.java +0 -97
- data/lib/proguard4.7/src/proguard/SubclassedClassFilter.java +0 -62
- data/lib/proguard4.7/src/proguard/Targeter.java +0 -88
- data/lib/proguard4.7/src/proguard/UpToDateChecker.java +0 -232
- data/lib/proguard4.7/src/proguard/WordReader.java +0 -387
- data/lib/proguard4.7/src/proguard/ant/ClassPathElement.java +0 -191
- data/lib/proguard4.7/src/proguard/ant/ClassSpecificationElement.java +0 -258
- data/lib/proguard4.7/src/proguard/ant/ConfigurationElement.java +0 -53
- data/lib/proguard4.7/src/proguard/ant/ConfigurationTask.java +0 -441
- data/lib/proguard4.7/src/proguard/ant/FilterElement.java +0 -85
- data/lib/proguard4.7/src/proguard/ant/KeepSpecificationElement.java +0 -87
- data/lib/proguard4.7/src/proguard/ant/MemberSpecificationElement.java +0 -218
- data/lib/proguard4.7/src/proguard/ant/ProGuardTask.java +0 -352
- data/lib/proguard4.7/src/proguard/ant/package.html +0 -3
- data/lib/proguard4.7/src/proguard/ant/task.properties +0 -2
- data/lib/proguard4.7/src/proguard/classfile/ClassConstants.java +0 -316
- data/lib/proguard4.7/src/proguard/classfile/ClassPool.java +0 -152
- data/lib/proguard4.7/src/proguard/classfile/Clazz.java +0 -261
- data/lib/proguard4.7/src/proguard/classfile/Field.java +0 -32
- data/lib/proguard4.7/src/proguard/classfile/LibraryClass.java +0 -548
- data/lib/proguard4.7/src/proguard/classfile/LibraryField.java +0 -77
- data/lib/proguard4.7/src/proguard/classfile/LibraryMember.java +0 -108
- data/lib/proguard4.7/src/proguard/classfile/LibraryMethod.java +0 -83
- data/lib/proguard4.7/src/proguard/classfile/Member.java +0 -57
- data/lib/proguard4.7/src/proguard/classfile/Method.java +0 -32
- data/lib/proguard4.7/src/proguard/classfile/ProgramClass.java +0 -572
- data/lib/proguard4.7/src/proguard/classfile/ProgramField.java +0 -93
- data/lib/proguard4.7/src/proguard/classfile/ProgramMember.java +0 -168
- data/lib/proguard4.7/src/proguard/classfile/ProgramMethod.java +0 -99
- data/lib/proguard4.7/src/proguard/classfile/VisitorAccepter.java +0 -47
- data/lib/proguard4.7/src/proguard/classfile/attribute/Attribute.java +0 -142
- data/lib/proguard4.7/src/proguard/classfile/attribute/BootstrapMethodInfo.java +0 -89
- data/lib/proguard4.7/src/proguard/classfile/attribute/BootstrapMethodsAttribute.java +0 -95
- data/lib/proguard4.7/src/proguard/classfile/attribute/CodeAttribute.java +0 -202
- data/lib/proguard4.7/src/proguard/classfile/attribute/ConstantValueAttribute.java +0 -62
- data/lib/proguard4.7/src/proguard/classfile/attribute/DeprecatedAttribute.java +0 -66
- data/lib/proguard4.7/src/proguard/classfile/attribute/EnclosingMethodAttribute.java +0 -132
- data/lib/proguard4.7/src/proguard/classfile/attribute/ExceptionInfo.java +0 -100
- data/lib/proguard4.7/src/proguard/classfile/attribute/ExceptionsAttribute.java +0 -80
- data/lib/proguard4.7/src/proguard/classfile/attribute/InnerClassesAttribute.java +0 -80
- data/lib/proguard4.7/src/proguard/classfile/attribute/InnerClassesInfo.java +0 -119
- data/lib/proguard4.7/src/proguard/classfile/attribute/LineNumberInfo.java +0 -50
- data/lib/proguard4.7/src/proguard/classfile/attribute/LineNumberTableAttribute.java +0 -100
- data/lib/proguard4.7/src/proguard/classfile/attribute/LocalVariableInfo.java +0 -99
- data/lib/proguard4.7/src/proguard/classfile/attribute/LocalVariableTableAttribute.java +0 -79
- data/lib/proguard4.7/src/proguard/classfile/attribute/LocalVariableTypeInfo.java +0 -107
- data/lib/proguard4.7/src/proguard/classfile/attribute/LocalVariableTypeTableAttribute.java +0 -79
- data/lib/proguard4.7/src/proguard/classfile/attribute/SignatureAttribute.java +0 -100
- data/lib/proguard4.7/src/proguard/classfile/attribute/SourceDirAttribute.java +0 -62
- data/lib/proguard4.7/src/proguard/classfile/attribute/SourceFileAttribute.java +0 -62
- data/lib/proguard4.7/src/proguard/classfile/attribute/SyntheticAttribute.java +0 -66
- data/lib/proguard4.7/src/proguard/classfile/attribute/UnknownAttribute.java +0 -82
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/Annotation.java +0 -143
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/AnnotationDefaultAttribute.java +0 -73
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/AnnotationElementValue.java +0 -76
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/AnnotationsAttribute.java +0 -100
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/ArrayElementValue.java +0 -82
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/ClassElementValue.java +0 -95
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/ConstantElementValue.java +0 -71
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/ElementValue.java +0 -126
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/EnumConstantElementValue.java +0 -99
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/ParameterAnnotationsAttribute.java +0 -83
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/RuntimeInvisibleAnnotationsAttribute.java +0 -70
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/RuntimeInvisibleParameterAnnotationsAttribute.java +0 -62
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/RuntimeVisibleAnnotationsAttribute.java +0 -70
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/RuntimeVisibleParameterAnnotationsAttribute.java +0 -62
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/package.html +0 -4
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/visitor/AllAnnotationVisitor.java +0 -100
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/visitor/AnnotatedClassVisitor.java +0 -62
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/visitor/AnnotationToMemberVisitor.java +0 -62
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/visitor/AnnotationTypeFilter.java +0 -102
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/visitor/AnnotationVisitor.java +0 -40
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/visitor/ElementValueVisitor.java +0 -51
- data/lib/proguard4.7/src/proguard/classfile/attribute/annotation/visitor/package.html +0 -3
- data/lib/proguard4.7/src/proguard/classfile/attribute/package.html +0 -3
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/DoubleType.java +0 -66
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/FloatType.java +0 -66
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/FullFrame.java +0 -202
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/IntegerType.java +0 -66
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/LessZeroFrame.java +0 -103
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/LongType.java +0 -66
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/MoreZeroFrame.java +0 -161
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/NullType.java +0 -66
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/ObjectType.java +0 -107
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/SameOneFrame.java +0 -115
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/SameZeroFrame.java +0 -74
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/StackMapAttribute.java +0 -91
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/StackMapFrame.java +0 -117
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/StackMapTableAttribute.java +0 -93
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/TopType.java +0 -66
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/UninitializedThisType.java +0 -66
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/UninitializedType.java +0 -106
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/VerificationType.java +0 -103
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/VerificationTypeFactory.java +0 -112
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/visitor/StackMapFrameVisitor.java +0 -40
- data/lib/proguard4.7/src/proguard/classfile/attribute/preverification/visitor/VerificationTypeVisitor.java +0 -65
- data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/AllAttributeVisitor.java +0 -117
- data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/AllBootstrapMethodInfoVisitor.java +0 -55
- data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/AllExceptionInfoVisitor.java +0 -55
- data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/AllInnerClassesInfoVisitor.java +0 -55
- data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/AttributeNameFilter.java +0 -368
- data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/AttributeVisitor.java +0 -90
- data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/BootstrapMethodInfoVisitor.java +0 -40
- data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/ExceptionInfoVisitor.java +0 -37
- data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/InnerClassesInfoVisitor.java +0 -38
- data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/LineNumberInfoVisitor.java +0 -38
- data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/LocalVariableInfoVisitor.java +0 -38
- data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/LocalVariableTypeInfoVisitor.java +0 -38
- data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/MultiAttributeVisitor.java +0 -365
- data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/NonEmptyAttributeFilter.java +0 -293
- data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/RequiredAttributeFilter.java +0 -360
- data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/StackSizeComputer.java +0 -378
- data/lib/proguard4.7/src/proguard/classfile/attribute/visitor/package.html +0 -3
- data/lib/proguard4.7/src/proguard/classfile/constant/ClassConstant.java +0 -105
- data/lib/proguard4.7/src/proguard/classfile/constant/Constant.java +0 -68
- data/lib/proguard4.7/src/proguard/classfile/constant/DoubleConstant.java +0 -82
- data/lib/proguard4.7/src/proguard/classfile/constant/FieldrefConstant.java +0 -71
- data/lib/proguard4.7/src/proguard/classfile/constant/FloatConstant.java +0 -82
- data/lib/proguard4.7/src/proguard/classfile/constant/IntegerConstant.java +0 -82
- data/lib/proguard4.7/src/proguard/classfile/constant/InterfaceMethodrefConstant.java +0 -71
- data/lib/proguard4.7/src/proguard/classfile/constant/InvokeDynamicConstant.java +0 -148
- data/lib/proguard4.7/src/proguard/classfile/constant/LongConstant.java +0 -82
- data/lib/proguard4.7/src/proguard/classfile/constant/MethodHandleConstant.java +0 -124
- data/lib/proguard4.7/src/proguard/classfile/constant/MethodTypeConstant.java +0 -93
- data/lib/proguard4.7/src/proguard/classfile/constant/MethodrefConstant.java +0 -71
- data/lib/proguard4.7/src/proguard/classfile/constant/NameAndTypeConstant.java +0 -119
- data/lib/proguard4.7/src/proguard/classfile/constant/RefConstant.java +0 -130
- data/lib/proguard4.7/src/proguard/classfile/constant/StringConstant.java +0 -135
- data/lib/proguard4.7/src/proguard/classfile/constant/Utf8Constant.java +0 -285
- data/lib/proguard4.7/src/proguard/classfile/constant/visitor/AllConstantVisitor.java +0 -53
- data/lib/proguard4.7/src/proguard/classfile/constant/visitor/BootstrapMethodHandleTraveler.java +0 -100
- data/lib/proguard4.7/src/proguard/classfile/constant/visitor/ConstantTagFilter.java +0 -86
- data/lib/proguard4.7/src/proguard/classfile/constant/visitor/ConstantVisitor.java +0 -49
- data/lib/proguard4.7/src/proguard/classfile/constant/visitor/ExceptClassConstantFilter.java +0 -69
- data/lib/proguard4.7/src/proguard/classfile/constant/visitor/MethodrefTraveler.java +0 -60
- data/lib/proguard4.7/src/proguard/classfile/constant/visitor/package.html +0 -3
- data/lib/proguard4.7/src/proguard/classfile/editor/AccessFixer.java +0 -180
- data/lib/proguard4.7/src/proguard/classfile/editor/AnnotationAdder.java +0 -153
- data/lib/proguard4.7/src/proguard/classfile/editor/AnnotationsAttributeEditor.java +0 -67
- data/lib/proguard4.7/src/proguard/classfile/editor/AttributeAdder.java +0 -457
- data/lib/proguard4.7/src/proguard/classfile/editor/AttributeSorter.java +0 -89
- data/lib/proguard4.7/src/proguard/classfile/editor/AttributesEditor.java +0 -269
- data/lib/proguard4.7/src/proguard/classfile/editor/BridgeMethodFixer.java +0 -117
- data/lib/proguard4.7/src/proguard/classfile/editor/ClassEditor.java +0 -255
- data/lib/proguard4.7/src/proguard/classfile/editor/ClassElementSorter.java +0 -52
- data/lib/proguard4.7/src/proguard/classfile/editor/ClassMemberSorter.java +0 -69
- data/lib/proguard4.7/src/proguard/classfile/editor/ClassReferenceFixer.java +0 -546
- data/lib/proguard4.7/src/proguard/classfile/editor/CodeAttributeComposer.java +0 -843
- data/lib/proguard4.7/src/proguard/classfile/editor/CodeAttributeEditor.java +0 -1104
- data/lib/proguard4.7/src/proguard/classfile/editor/CodeAttributeEditorResetter.java +0 -60
- data/lib/proguard4.7/src/proguard/classfile/editor/ComparableConstant.java +0 -249
- data/lib/proguard4.7/src/proguard/classfile/editor/ConstantAdder.java +0 -239
- data/lib/proguard4.7/src/proguard/classfile/editor/ConstantPoolEditor.java +0 -782
- data/lib/proguard4.7/src/proguard/classfile/editor/ConstantPoolRemapper.java +0 -662
- data/lib/proguard4.7/src/proguard/classfile/editor/ConstantPoolShrinker.java +0 -578
- data/lib/proguard4.7/src/proguard/classfile/editor/ConstantPoolSorter.java +0 -123
- data/lib/proguard4.7/src/proguard/classfile/editor/ElementValueAdder.java +0 -217
- data/lib/proguard4.7/src/proguard/classfile/editor/ElementValuesEditor.java +0 -238
- data/lib/proguard4.7/src/proguard/classfile/editor/ExceptionAdder.java +0 -65
- data/lib/proguard4.7/src/proguard/classfile/editor/ExceptionInfoAdder.java +0 -67
- data/lib/proguard4.7/src/proguard/classfile/editor/ExceptionsAttributeEditor.java +0 -68
- data/lib/proguard4.7/src/proguard/classfile/editor/InnerClassesAccessFixer.java +0 -83
- data/lib/proguard4.7/src/proguard/classfile/editor/InstructionAdder.java +0 -76
- data/lib/proguard4.7/src/proguard/classfile/editor/InstructionWriter.java +0 -278
- data/lib/proguard4.7/src/proguard/classfile/editor/InterfaceAdder.java +0 -62
- data/lib/proguard4.7/src/proguard/classfile/editor/InterfaceSorter.java +0 -152
- data/lib/proguard4.7/src/proguard/classfile/editor/InterfacesEditor.java +0 -122
- data/lib/proguard4.7/src/proguard/classfile/editor/LineNumberInfoAdder.java +0 -59
- data/lib/proguard4.7/src/proguard/classfile/editor/LineNumberTableAttributeEditor.java +0 -67
- data/lib/proguard4.7/src/proguard/classfile/editor/LocalVariableInfoAdder.java +0 -67
- data/lib/proguard4.7/src/proguard/classfile/editor/LocalVariableTableAttributeEditor.java +0 -67
- data/lib/proguard4.7/src/proguard/classfile/editor/LocalVariableTypeInfoAdder.java +0 -68
- data/lib/proguard4.7/src/proguard/classfile/editor/LocalVariableTypeTableAttributeEditor.java +0 -68
- data/lib/proguard4.7/src/proguard/classfile/editor/MemberAdder.java +0 -288
- data/lib/proguard4.7/src/proguard/classfile/editor/MemberReferenceFixer.java +0 -447
- data/lib/proguard4.7/src/proguard/classfile/editor/MethodInvocationFixer.java +0 -243
- data/lib/proguard4.7/src/proguard/classfile/editor/NameAndTypeShrinker.java +0 -188
- data/lib/proguard4.7/src/proguard/classfile/editor/NamedAttributeDeleter.java +0 -54
- data/lib/proguard4.7/src/proguard/classfile/editor/ParameterAnnotationsAttributeEditor.java +0 -71
- data/lib/proguard4.7/src/proguard/classfile/editor/StackSizeUpdater.java +0 -54
- data/lib/proguard4.7/src/proguard/classfile/editor/SubclassAdder.java +0 -59
- data/lib/proguard4.7/src/proguard/classfile/editor/SubclassToAdder.java +0 -60
- data/lib/proguard4.7/src/proguard/classfile/editor/Utf8Shrinker.java +0 -455
- data/lib/proguard4.7/src/proguard/classfile/editor/VariableCleaner.java +0 -267
- data/lib/proguard4.7/src/proguard/classfile/editor/VariableEditor.java +0 -130
- data/lib/proguard4.7/src/proguard/classfile/editor/VariableRemapper.java +0 -156
- data/lib/proguard4.7/src/proguard/classfile/editor/VariableSizeUpdater.java +0 -105
- data/lib/proguard4.7/src/proguard/classfile/editor/package.html +0 -3
- data/lib/proguard4.7/src/proguard/classfile/instruction/BranchInstruction.java +0 -180
- data/lib/proguard4.7/src/proguard/classfile/instruction/ConstantInstruction.java +0 -309
- data/lib/proguard4.7/src/proguard/classfile/instruction/Instruction.java +0 -920
- data/lib/proguard4.7/src/proguard/classfile/instruction/InstructionConstants.java +0 -449
- data/lib/proguard4.7/src/proguard/classfile/instruction/InstructionFactory.java +0 -300
- data/lib/proguard4.7/src/proguard/classfile/instruction/InstructionUtil.java +0 -67
- data/lib/proguard4.7/src/proguard/classfile/instruction/LookUpSwitchInstruction.java +0 -135
- data/lib/proguard4.7/src/proguard/classfile/instruction/SimpleInstruction.java +0 -255
- data/lib/proguard4.7/src/proguard/classfile/instruction/SwitchInstruction.java +0 -83
- data/lib/proguard4.7/src/proguard/classfile/instruction/TableSwitchInstruction.java +0 -139
- data/lib/proguard4.7/src/proguard/classfile/instruction/VariableInstruction.java +0 -372
- data/lib/proguard4.7/src/proguard/classfile/instruction/package.html +0 -9
- data/lib/proguard4.7/src/proguard/classfile/instruction/visitor/AllInstructionVisitor.java +0 -56
- data/lib/proguard4.7/src/proguard/classfile/instruction/visitor/InstructionCounter.java +0 -59
- data/lib/proguard4.7/src/proguard/classfile/instruction/visitor/InstructionVisitor.java +0 -42
- data/lib/proguard4.7/src/proguard/classfile/instruction/visitor/MultiInstructionVisitor.java +0 -131
- data/lib/proguard4.7/src/proguard/classfile/instruction/visitor/package.html +0 -3
- data/lib/proguard4.7/src/proguard/classfile/io/LibraryClassReader.java +0 -383
- data/lib/proguard4.7/src/proguard/classfile/io/ProgramClassReader.java +0 -919
- data/lib/proguard4.7/src/proguard/classfile/io/ProgramClassWriter.java +0 -735
- data/lib/proguard4.7/src/proguard/classfile/io/RuntimeDataInput.java +0 -223
- data/lib/proguard4.7/src/proguard/classfile/io/RuntimeDataOutput.java +0 -224
- data/lib/proguard4.7/src/proguard/classfile/io/package.html +0 -3
- data/lib/proguard4.7/src/proguard/classfile/package.html +0 -15
- data/lib/proguard4.7/src/proguard/classfile/util/AccessUtil.java +0 -105
- data/lib/proguard4.7/src/proguard/classfile/util/ClassReferenceInitializer.java +0 -559
- data/lib/proguard4.7/src/proguard/classfile/util/ClassSubHierarchyInitializer.java +0 -77
- data/lib/proguard4.7/src/proguard/classfile/util/ClassSuperHierarchyInitializer.java +0 -163
- data/lib/proguard4.7/src/proguard/classfile/util/ClassUtil.java +0 -1227
- data/lib/proguard4.7/src/proguard/classfile/util/DescriptorClassEnumeration.java +0 -236
- data/lib/proguard4.7/src/proguard/classfile/util/DynamicClassReferenceInitializer.java +0 -485
- data/lib/proguard4.7/src/proguard/classfile/util/DynamicMemberReferenceInitializer.java +0 -944
- data/lib/proguard4.7/src/proguard/classfile/util/ExternalTypeEnumeration.java +0 -106
- data/lib/proguard4.7/src/proguard/classfile/util/InstructionSequenceMatcher.java +0 -754
- data/lib/proguard4.7/src/proguard/classfile/util/InternalTypeEnumeration.java +0 -204
- data/lib/proguard4.7/src/proguard/classfile/util/MemberFinder.java +0 -197
- data/lib/proguard4.7/src/proguard/classfile/util/MethodLinker.java +0 -160
- data/lib/proguard4.7/src/proguard/classfile/util/SimplifiedVisitor.java +0 -834
- data/lib/proguard4.7/src/proguard/classfile/util/StringReferenceInitializer.java +0 -90
- data/lib/proguard4.7/src/proguard/classfile/util/StringSharer.java +0 -172
- data/lib/proguard4.7/src/proguard/classfile/util/WarningPrinter.java +0 -136
- data/lib/proguard4.7/src/proguard/classfile/util/package.html +0 -3
- data/lib/proguard4.7/src/proguard/classfile/visitor/AllClassVisitor.java +0 -47
- data/lib/proguard4.7/src/proguard/classfile/visitor/AllFieldVisitor.java +0 -55
- data/lib/proguard4.7/src/proguard/classfile/visitor/AllMemberVisitor.java +0 -57
- data/lib/proguard4.7/src/proguard/classfile/visitor/AllMethodVisitor.java +0 -55
- data/lib/proguard4.7/src/proguard/classfile/visitor/BottomClassFilter.java +0 -69
- data/lib/proguard4.7/src/proguard/classfile/visitor/ClassAccessFilter.java +0 -88
- data/lib/proguard4.7/src/proguard/classfile/visitor/ClassCleaner.java +0 -275
- data/lib/proguard4.7/src/proguard/classfile/visitor/ClassCollector.java +0 -58
- data/lib/proguard4.7/src/proguard/classfile/visitor/ClassCounter.java +0 -56
- data/lib/proguard4.7/src/proguard/classfile/visitor/ClassHierarchyTraveler.java +0 -91
- data/lib/proguard4.7/src/proguard/classfile/visitor/ClassNameFilter.java +0 -112
- data/lib/proguard4.7/src/proguard/classfile/visitor/ClassPoolFiller.java +0 -55
- data/lib/proguard4.7/src/proguard/classfile/visitor/ClassPoolVisitor.java +0 -37
- data/lib/proguard4.7/src/proguard/classfile/visitor/ClassPresenceFilter.java +0 -93
- data/lib/proguard4.7/src/proguard/classfile/visitor/ClassPrinter.java +0 -1011
- data/lib/proguard4.7/src/proguard/classfile/visitor/ClassVersionFilter.java +0 -85
- data/lib/proguard4.7/src/proguard/classfile/visitor/ClassVersionSetter.java +0 -83
- data/lib/proguard4.7/src/proguard/classfile/visitor/ClassVisitor.java +0 -36
- data/lib/proguard4.7/src/proguard/classfile/visitor/ConcreteClassDownTraveler.java +0 -100
- data/lib/proguard4.7/src/proguard/classfile/visitor/DotClassClassVisitor.java +0 -89
- data/lib/proguard4.7/src/proguard/classfile/visitor/ExceptClassFilter.java +0 -69
- data/lib/proguard4.7/src/proguard/classfile/visitor/ExceptClassesFilter.java +0 -90
- data/lib/proguard4.7/src/proguard/classfile/visitor/ExceptionCounter.java +0 -52
- data/lib/proguard4.7/src/proguard/classfile/visitor/ExceptionExcludedOffsetFilter.java +0 -64
- data/lib/proguard4.7/src/proguard/classfile/visitor/ExceptionHandlerConstantVisitor.java +0 -62
- data/lib/proguard4.7/src/proguard/classfile/visitor/ExceptionHandlerFilter.java +0 -70
- data/lib/proguard4.7/src/proguard/classfile/visitor/ExceptionOffsetFilter.java +0 -64
- data/lib/proguard4.7/src/proguard/classfile/visitor/ExceptionRangeFilter.java +0 -68
- data/lib/proguard4.7/src/proguard/classfile/visitor/ImplementedClassConstantFilter.java +0 -69
- data/lib/proguard4.7/src/proguard/classfile/visitor/ImplementedClassFilter.java +0 -71
- data/lib/proguard4.7/src/proguard/classfile/visitor/ImplementingClassConstantFilter.java +0 -70
- data/lib/proguard4.7/src/proguard/classfile/visitor/LibraryClassFilter.java +0 -60
- data/lib/proguard4.7/src/proguard/classfile/visitor/LibraryMemberFilter.java +0 -73
- data/lib/proguard4.7/src/proguard/classfile/visitor/MemberAccessFilter.java +0 -122
- data/lib/proguard4.7/src/proguard/classfile/visitor/MemberClassAccessFilter.java +0 -106
- data/lib/proguard4.7/src/proguard/classfile/visitor/MemberCollector.java +0 -59
- data/lib/proguard4.7/src/proguard/classfile/visitor/MemberCounter.java +0 -72
- data/lib/proguard4.7/src/proguard/classfile/visitor/MemberDescriptorFilter.java +0 -113
- data/lib/proguard4.7/src/proguard/classfile/visitor/MemberNameFilter.java +0 -113
- data/lib/proguard4.7/src/proguard/classfile/visitor/MemberToClassVisitor.java +0 -90
- data/lib/proguard4.7/src/proguard/classfile/visitor/MemberVisitor.java +0 -40
- data/lib/proguard4.7/src/proguard/classfile/visitor/MethodImplementationFilter.java +0 -70
- data/lib/proguard4.7/src/proguard/classfile/visitor/MethodImplementationTraveler.java +0 -128
- data/lib/proguard4.7/src/proguard/classfile/visitor/MultiClassPoolVisitor.java +0 -88
- data/lib/proguard4.7/src/proguard/classfile/visitor/MultiClassVisitor.java +0 -97
- data/lib/proguard4.7/src/proguard/classfile/visitor/MultiMemberVisitor.java +0 -113
- data/lib/proguard4.7/src/proguard/classfile/visitor/NamedClassVisitor.java +0 -49
- data/lib/proguard4.7/src/proguard/classfile/visitor/NamedFieldVisitor.java +0 -61
- data/lib/proguard4.7/src/proguard/classfile/visitor/NamedMethodVisitor.java +0 -61
- data/lib/proguard4.7/src/proguard/classfile/visitor/ProgramClassFilter.java +0 -60
- data/lib/proguard4.7/src/proguard/classfile/visitor/ProgramMemberFilter.java +0 -73
- data/lib/proguard4.7/src/proguard/classfile/visitor/ReferencedClassVisitor.java +0 -255
- data/lib/proguard4.7/src/proguard/classfile/visitor/ReferencedMemberVisitor.java +0 -73
- data/lib/proguard4.7/src/proguard/classfile/visitor/SimilarMemberVisitor.java +0 -125
- data/lib/proguard4.7/src/proguard/classfile/visitor/SimpleClassPrinter.java +0 -167
- data/lib/proguard4.7/src/proguard/classfile/visitor/SubclassFilter.java +0 -91
- data/lib/proguard4.7/src/proguard/classfile/visitor/SubclassTraveler.java +0 -60
- data/lib/proguard4.7/src/proguard/classfile/visitor/VariableClassVisitor.java +0 -78
- data/lib/proguard4.7/src/proguard/classfile/visitor/VariableMemberVisitor.java +0 -96
- data/lib/proguard4.7/src/proguard/classfile/visitor/package.html +0 -40
- data/lib/proguard4.7/src/proguard/evaluation/BasicBranchUnit.java +0 -126
- data/lib/proguard4.7/src/proguard/evaluation/BasicInvocationUnit.java +0 -425
- data/lib/proguard4.7/src/proguard/evaluation/BranchUnit.java +0 -63
- data/lib/proguard4.7/src/proguard/evaluation/ClassConstantValueFactory.java +0 -53
- data/lib/proguard4.7/src/proguard/evaluation/ConstantValueFactory.java +0 -113
- data/lib/proguard4.7/src/proguard/evaluation/InvocationUnit.java +0 -62
- data/lib/proguard4.7/src/proguard/evaluation/Processor.java +0 -908
- data/lib/proguard4.7/src/proguard/evaluation/Stack.java +0 -560
- data/lib/proguard4.7/src/proguard/evaluation/TracedStack.java +0 -342
- data/lib/proguard4.7/src/proguard/evaluation/TracedVariables.java +0 -199
- data/lib/proguard4.7/src/proguard/evaluation/Variables.java +0 -347
- data/lib/proguard4.7/src/proguard/evaluation/value/Category1Value.java +0 -41
- data/lib/proguard4.7/src/proguard/evaluation/value/Category2Value.java +0 -41
- data/lib/proguard4.7/src/proguard/evaluation/value/ComparisonValue.java +0 -69
- data/lib/proguard4.7/src/proguard/evaluation/value/CompositeDoubleValue.java +0 -81
- data/lib/proguard4.7/src/proguard/evaluation/value/CompositeFloatValue.java +0 -81
- data/lib/proguard4.7/src/proguard/evaluation/value/CompositeIntegerValue.java +0 -87
- data/lib/proguard4.7/src/proguard/evaluation/value/CompositeLongValue.java +0 -87
- data/lib/proguard4.7/src/proguard/evaluation/value/ConvertedByteValue.java +0 -64
- data/lib/proguard4.7/src/proguard/evaluation/value/ConvertedCharacterValue.java +0 -64
- data/lib/proguard4.7/src/proguard/evaluation/value/ConvertedDoubleValue.java +0 -64
- data/lib/proguard4.7/src/proguard/evaluation/value/ConvertedFloatValue.java +0 -64
- data/lib/proguard4.7/src/proguard/evaluation/value/ConvertedIntegerValue.java +0 -64
- data/lib/proguard4.7/src/proguard/evaluation/value/ConvertedLongValue.java +0 -64
- data/lib/proguard4.7/src/proguard/evaluation/value/ConvertedShortValue.java +0 -64
- data/lib/proguard4.7/src/proguard/evaluation/value/DoubleValue.java +0 -359
- data/lib/proguard4.7/src/proguard/evaluation/value/FloatValue.java +0 -359
- data/lib/proguard4.7/src/proguard/evaluation/value/IdentifiedDoubleValue.java +0 -67
- data/lib/proguard4.7/src/proguard/evaluation/value/IdentifiedFloatValue.java +0 -67
- data/lib/proguard4.7/src/proguard/evaluation/value/IdentifiedIntegerValue.java +0 -67
- data/lib/proguard4.7/src/proguard/evaluation/value/IdentifiedLongValue.java +0 -67
- data/lib/proguard4.7/src/proguard/evaluation/value/IdentifiedReferenceValue.java +0 -102
- data/lib/proguard4.7/src/proguard/evaluation/value/IdentifiedValueFactory.java +0 -75
- data/lib/proguard4.7/src/proguard/evaluation/value/InstructionOffsetValue.java +0 -307
- data/lib/proguard4.7/src/proguard/evaluation/value/IntegerValue.java +0 -1002
- data/lib/proguard4.7/src/proguard/evaluation/value/LongValue.java +0 -554
- data/lib/proguard4.7/src/proguard/evaluation/value/NegatedDoubleValue.java +0 -71
- data/lib/proguard4.7/src/proguard/evaluation/value/NegatedFloatValue.java +0 -71
- data/lib/proguard4.7/src/proguard/evaluation/value/NegatedIntegerValue.java +0 -71
- data/lib/proguard4.7/src/proguard/evaluation/value/NegatedLongValue.java +0 -71
- data/lib/proguard4.7/src/proguard/evaluation/value/ParticularDoubleValue.java +0 -216
- data/lib/proguard4.7/src/proguard/evaluation/value/ParticularFloatValue.java +0 -216
- data/lib/proguard4.7/src/proguard/evaluation/value/ParticularIntegerValue.java +0 -383
- data/lib/proguard4.7/src/proguard/evaluation/value/ParticularLongValue.java +0 -271
- data/lib/proguard4.7/src/proguard/evaluation/value/ReferenceValue.java +0 -540
- data/lib/proguard4.7/src/proguard/evaluation/value/SpecificDoubleValue.java +0 -186
- data/lib/proguard4.7/src/proguard/evaluation/value/SpecificFloatValue.java +0 -186
- data/lib/proguard4.7/src/proguard/evaluation/value/SpecificIntegerValue.java +0 -354
- data/lib/proguard4.7/src/proguard/evaluation/value/SpecificLongValue.java +0 -259
- data/lib/proguard4.7/src/proguard/evaluation/value/SpecificValueFactory.java +0 -97
- data/lib/proguard4.7/src/proguard/evaluation/value/TopValue.java +0 -79
- data/lib/proguard4.7/src/proguard/evaluation/value/UnknownDoubleValue.java +0 -125
- data/lib/proguard4.7/src/proguard/evaluation/value/UnknownFloatValue.java +0 -125
- data/lib/proguard4.7/src/proguard/evaluation/value/UnknownIntegerValue.java +0 -216
- data/lib/proguard4.7/src/proguard/evaluation/value/UnknownLongValue.java +0 -160
- data/lib/proguard4.7/src/proguard/evaluation/value/Value.java +0 -169
- data/lib/proguard4.7/src/proguard/evaluation/value/ValueFactory.java +0 -193
- data/lib/proguard4.7/src/proguard/evaluation/value/package.html +0 -3
- data/lib/proguard4.7/src/proguard/gui/ClassPathPanel.java +0 -441
- data/lib/proguard4.7/src/proguard/gui/ClassSpecificationDialog.java +0 -546
- data/lib/proguard4.7/src/proguard/gui/ClassSpecificationsPanel.java +0 -231
- data/lib/proguard4.7/src/proguard/gui/ExtensionFileFilter.java +0 -78
- data/lib/proguard4.7/src/proguard/gui/FilterBuilder.java +0 -208
- data/lib/proguard4.7/src/proguard/gui/FilterDialog.java +0 -320
- data/lib/proguard4.7/src/proguard/gui/GUIResources.java +0 -56
- data/lib/proguard4.7/src/proguard/gui/GUIResources.properties +0 -643
- data/lib/proguard4.7/src/proguard/gui/KeepSpecificationsPanel.java +0 -81
- data/lib/proguard4.7/src/proguard/gui/ListPanel.java +0 -341
- data/lib/proguard4.7/src/proguard/gui/MANIFEST.MF +0 -3
- data/lib/proguard4.7/src/proguard/gui/MemberSpecificationDialog.java +0 -509
- data/lib/proguard4.7/src/proguard/gui/MemberSpecificationsPanel.java +0 -304
- data/lib/proguard4.7/src/proguard/gui/MessageDialogRunnable.java +0 -90
- data/lib/proguard4.7/src/proguard/gui/OptimizationsDialog.java +0 -251
- data/lib/proguard4.7/src/proguard/gui/ProGuardGUI.java +0 -1777
- data/lib/proguard4.7/src/proguard/gui/ProGuardRunnable.java +0 -154
- data/lib/proguard4.7/src/proguard/gui/ReTraceRunnable.java +0 -149
- data/lib/proguard4.7/src/proguard/gui/SwingUtil.java +0 -82
- data/lib/proguard4.7/src/proguard/gui/TabbedPane.java +0 -229
- data/lib/proguard4.7/src/proguard/gui/TextAreaOutputStream.java +0 -81
- data/lib/proguard4.7/src/proguard/gui/arrow.gif +0 -0
- data/lib/proguard4.7/src/proguard/gui/boilerplate.pro +0 -410
- data/lib/proguard4.7/src/proguard/gui/default.pro +0 -318
- data/lib/proguard4.7/src/proguard/gui/package.html +0 -3
- data/lib/proguard4.7/src/proguard/gui/splash/BufferedSprite.java +0 -145
- data/lib/proguard4.7/src/proguard/gui/splash/CircleSprite.java +0 -74
- data/lib/proguard4.7/src/proguard/gui/splash/ClipSprite.java +0 -85
- data/lib/proguard4.7/src/proguard/gui/splash/ColorSprite.java +0 -65
- data/lib/proguard4.7/src/proguard/gui/splash/CompositeSprite.java +0 -56
- data/lib/proguard4.7/src/proguard/gui/splash/ConstantColor.java +0 -51
- data/lib/proguard4.7/src/proguard/gui/splash/ConstantDouble.java +0 -49
- data/lib/proguard4.7/src/proguard/gui/splash/ConstantFont.java +0 -46
- data/lib/proguard4.7/src/proguard/gui/splash/ConstantInt.java +0 -49
- data/lib/proguard4.7/src/proguard/gui/splash/ConstantString.java +0 -49
- data/lib/proguard4.7/src/proguard/gui/splash/ConstantTiming.java +0 -57
- data/lib/proguard4.7/src/proguard/gui/splash/FontSprite.java +0 -65
- data/lib/proguard4.7/src/proguard/gui/splash/ImageSprite.java +0 -76
- data/lib/proguard4.7/src/proguard/gui/splash/LinearColor.java +0 -72
- data/lib/proguard4.7/src/proguard/gui/splash/LinearDouble.java +0 -55
- data/lib/proguard4.7/src/proguard/gui/splash/LinearInt.java +0 -55
- data/lib/proguard4.7/src/proguard/gui/splash/LinearTiming.java +0 -55
- data/lib/proguard4.7/src/proguard/gui/splash/OverrideGraphics2D.java +0 -598
- data/lib/proguard4.7/src/proguard/gui/splash/RectangleSprite.java +0 -114
- data/lib/proguard4.7/src/proguard/gui/splash/SawToothTiming.java +0 -53
- data/lib/proguard4.7/src/proguard/gui/splash/ShadowedSprite.java +0 -109
- data/lib/proguard4.7/src/proguard/gui/splash/SineTiming.java +0 -53
- data/lib/proguard4.7/src/proguard/gui/splash/SmoothTiming.java +0 -66
- data/lib/proguard4.7/src/proguard/gui/splash/SplashPanel.java +0 -235
- data/lib/proguard4.7/src/proguard/gui/splash/Sprite.java +0 -41
- data/lib/proguard4.7/src/proguard/gui/splash/TextSprite.java +0 -89
- data/lib/proguard4.7/src/proguard/gui/splash/TimeSwitchSprite.java +0 -75
- data/lib/proguard4.7/src/proguard/gui/splash/Timing.java +0 -34
- data/lib/proguard4.7/src/proguard/gui/splash/TypeWriterString.java +0 -71
- data/lib/proguard4.7/src/proguard/gui/splash/VariableColor.java +0 -36
- data/lib/proguard4.7/src/proguard/gui/splash/VariableDouble.java +0 -34
- data/lib/proguard4.7/src/proguard/gui/splash/VariableFont.java +0 -36
- data/lib/proguard4.7/src/proguard/gui/splash/VariableInt.java +0 -34
- data/lib/proguard4.7/src/proguard/gui/splash/VariableSizeFont.java +0 -65
- data/lib/proguard4.7/src/proguard/gui/splash/VariableString.java +0 -34
- data/lib/proguard4.7/src/proguard/gui/splash/package.html +0 -4
- data/lib/proguard4.7/src/proguard/gui/vtitle.png +0 -0
- data/lib/proguard4.7/src/proguard/io/CascadingDataEntryWriter.java +0 -94
- data/lib/proguard4.7/src/proguard/io/ClassFilter.java +0 -59
- data/lib/proguard4.7/src/proguard/io/ClassReader.java +0 -115
- data/lib/proguard4.7/src/proguard/io/ClassRewriter.java +0 -80
- data/lib/proguard4.7/src/proguard/io/DataEntry.java +0 -62
- data/lib/proguard4.7/src/proguard/io/DataEntryClassWriter.java +0 -85
- data/lib/proguard4.7/src/proguard/io/DataEntryCopier.java +0 -247
- data/lib/proguard4.7/src/proguard/io/DataEntryDirectoryFilter.java +0 -40
- data/lib/proguard4.7/src/proguard/io/DataEntryFilter.java +0 -38
- data/lib/proguard4.7/src/proguard/io/DataEntryNameFilter.java +0 -54
- data/lib/proguard4.7/src/proguard/io/DataEntryObfuscator.java +0 -150
- data/lib/proguard4.7/src/proguard/io/DataEntryParentFilter.java +0 -51
- data/lib/proguard4.7/src/proguard/io/DataEntryPump.java +0 -43
- data/lib/proguard4.7/src/proguard/io/DataEntryReader.java +0 -38
- data/lib/proguard4.7/src/proguard/io/DataEntryRenamer.java +0 -104
- data/lib/proguard4.7/src/proguard/io/DataEntryRewriter.java +0 -148
- data/lib/proguard4.7/src/proguard/io/DataEntryWriter.java +0 -73
- data/lib/proguard4.7/src/proguard/io/DirectoryFilter.java +0 -58
- data/lib/proguard4.7/src/proguard/io/DirectoryPump.java +0 -78
- data/lib/proguard4.7/src/proguard/io/DirectoryWriter.java +0 -165
- data/lib/proguard4.7/src/proguard/io/FileDataEntry.java +0 -96
- data/lib/proguard4.7/src/proguard/io/FilteredDataEntryReader.java +0 -90
- data/lib/proguard4.7/src/proguard/io/FilteredDataEntryWriter.java +0 -125
- data/lib/proguard4.7/src/proguard/io/Finisher.java +0 -37
- data/lib/proguard4.7/src/proguard/io/JarReader.java +0 -75
- data/lib/proguard4.7/src/proguard/io/JarWriter.java +0 -235
- data/lib/proguard4.7/src/proguard/io/ManifestRewriter.java +0 -216
- data/lib/proguard4.7/src/proguard/io/NameFilter.java +0 -83
- data/lib/proguard4.7/src/proguard/io/ParentDataEntryWriter.java +0 -75
- data/lib/proguard4.7/src/proguard/io/RenamedDataEntry.java +0 -83
- data/lib/proguard4.7/src/proguard/io/ZipDataEntry.java +0 -98
- data/lib/proguard4.7/src/proguard/io/package.html +0 -4
- data/lib/proguard4.7/src/proguard/obfuscate/AttributeShrinker.java +0 -120
- data/lib/proguard4.7/src/proguard/obfuscate/AttributeUsageMarker.java +0 -71
- data/lib/proguard4.7/src/proguard/obfuscate/ClassObfuscator.java +0 -533
- data/lib/proguard4.7/src/proguard/obfuscate/ClassRenamer.java +0 -109
- data/lib/proguard4.7/src/proguard/obfuscate/DictionaryNameFactory.java +0 -189
- data/lib/proguard4.7/src/proguard/obfuscate/MapCleaner.java +0 -57
- data/lib/proguard4.7/src/proguard/obfuscate/MappingKeeper.java +0 -177
- data/lib/proguard4.7/src/proguard/obfuscate/MappingPrinter.java +0 -147
- data/lib/proguard4.7/src/proguard/obfuscate/MappingProcessor.java +0 -79
- data/lib/proguard4.7/src/proguard/obfuscate/MappingReader.java +0 -199
- data/lib/proguard4.7/src/proguard/obfuscate/MemberNameCleaner.java +0 -60
- data/lib/proguard4.7/src/proguard/obfuscate/MemberNameCollector.java +0 -106
- data/lib/proguard4.7/src/proguard/obfuscate/MemberNameConflictFixer.java +0 -159
- data/lib/proguard4.7/src/proguard/obfuscate/MemberNameFilter.java +0 -120
- data/lib/proguard4.7/src/proguard/obfuscate/MemberObfuscator.java +0 -230
- data/lib/proguard4.7/src/proguard/obfuscate/MemberSpecialNameFilter.java +0 -101
- data/lib/proguard4.7/src/proguard/obfuscate/MultiMappingProcessor.java +0 -96
- data/lib/proguard4.7/src/proguard/obfuscate/NameFactory.java +0 -34
- data/lib/proguard4.7/src/proguard/obfuscate/NameFactoryResetter.java +0 -59
- data/lib/proguard4.7/src/proguard/obfuscate/NameMarker.java +0 -166
- data/lib/proguard4.7/src/proguard/obfuscate/NumericNameFactory.java +0 -49
- data/lib/proguard4.7/src/proguard/obfuscate/Obfuscator.java +0 -445
- data/lib/proguard4.7/src/proguard/obfuscate/ParameterNameMarker.java +0 -128
- data/lib/proguard4.7/src/proguard/obfuscate/SimpleNameFactory.java +0 -156
- data/lib/proguard4.7/src/proguard/obfuscate/SourceFileRenamer.java +0 -84
- data/lib/proguard4.7/src/proguard/obfuscate/SpecialNameFactory.java +0 -83
- data/lib/proguard4.7/src/proguard/obfuscate/package.html +0 -3
- data/lib/proguard4.7/src/proguard/optimize/BootstrapMethodArgumentShrinker.java +0 -103
- data/lib/proguard4.7/src/proguard/optimize/ChangedCodePrinter.java +0 -297
- data/lib/proguard4.7/src/proguard/optimize/ConstantMemberFilter.java +0 -77
- data/lib/proguard4.7/src/proguard/optimize/ConstantParameterFilter.java +0 -79
- data/lib/proguard4.7/src/proguard/optimize/DuplicateInitializerFixer.java +0 -215
- data/lib/proguard4.7/src/proguard/optimize/DuplicateInitializerInvocationFixer.java +0 -161
- data/lib/proguard4.7/src/proguard/optimize/KeepMarker.java +0 -95
- data/lib/proguard4.7/src/proguard/optimize/KeptClassFilter.java +0 -69
- data/lib/proguard4.7/src/proguard/optimize/KeptMemberFilter.java +0 -88
- data/lib/proguard4.7/src/proguard/optimize/MemberDescriptorSpecializer.java +0 -138
- data/lib/proguard4.7/src/proguard/optimize/MethodDescriptorShrinker.java +0 -317
- data/lib/proguard4.7/src/proguard/optimize/MethodStaticizer.java +0 -87
- data/lib/proguard4.7/src/proguard/optimize/OptimizationInfoMemberFilter.java +0 -94
- data/lib/proguard4.7/src/proguard/optimize/Optimizer.java +0 -963
- data/lib/proguard4.7/src/proguard/optimize/ParameterShrinker.java +0 -146
- data/lib/proguard4.7/src/proguard/optimize/TailRecursionSimplifier.java +0 -356
- data/lib/proguard4.7/src/proguard/optimize/WriteOnlyFieldFilter.java +0 -65
- data/lib/proguard4.7/src/proguard/optimize/evaluation/EvaluationShrinker.java +0 -2082
- data/lib/proguard4.7/src/proguard/optimize/evaluation/EvaluationSimplifier.java +0 -973
- data/lib/proguard4.7/src/proguard/optimize/evaluation/LivenessAnalyzer.java +0 -526
- data/lib/proguard4.7/src/proguard/optimize/evaluation/LoadingInvocationUnit.java +0 -195
- data/lib/proguard4.7/src/proguard/optimize/evaluation/PartialEvaluator.java +0 -1282
- data/lib/proguard4.7/src/proguard/optimize/evaluation/StoringInvocationUnit.java +0 -207
- data/lib/proguard4.7/src/proguard/optimize/evaluation/TracedBranchUnit.java +0 -59
- data/lib/proguard4.7/src/proguard/optimize/evaluation/VariableOptimizer.java +0 -345
- data/lib/proguard4.7/src/proguard/optimize/evaluation/package.html +0 -4
- data/lib/proguard4.7/src/proguard/optimize/info/AccessMethodMarker.java +0 -202
- data/lib/proguard4.7/src/proguard/optimize/info/BackwardBranchMarker.java +0 -90
- data/lib/proguard4.7/src/proguard/optimize/info/CatchExceptionMarker.java +0 -69
- data/lib/proguard4.7/src/proguard/optimize/info/CaughtClassFilter.java +0 -63
- data/lib/proguard4.7/src/proguard/optimize/info/CaughtClassMarker.java +0 -64
- data/lib/proguard4.7/src/proguard/optimize/info/ClassOptimizationInfo.java +0 -165
- data/lib/proguard4.7/src/proguard/optimize/info/ClassOptimizationInfoSetter.java +0 -47
- data/lib/proguard4.7/src/proguard/optimize/info/DotClassFilter.java +0 -63
- data/lib/proguard4.7/src/proguard/optimize/info/DotClassMarker.java +0 -96
- data/lib/proguard4.7/src/proguard/optimize/info/ExceptionInstructionChecker.java +0 -193
- data/lib/proguard4.7/src/proguard/optimize/info/FieldOptimizationInfo.java +0 -204
- data/lib/proguard4.7/src/proguard/optimize/info/InstanceofClassFilter.java +0 -63
- data/lib/proguard4.7/src/proguard/optimize/info/InstanceofClassMarker.java +0 -93
- data/lib/proguard4.7/src/proguard/optimize/info/InstantiationClassFilter.java +0 -62
- data/lib/proguard4.7/src/proguard/optimize/info/InstantiationClassMarker.java +0 -93
- data/lib/proguard4.7/src/proguard/optimize/info/MemberOptimizationInfoSetter.java +0 -59
- data/lib/proguard4.7/src/proguard/optimize/info/MethodInvocationMarker.java +0 -107
- data/lib/proguard4.7/src/proguard/optimize/info/MethodOptimizationInfo.java +0 -302
- data/lib/proguard4.7/src/proguard/optimize/info/NoSideEffectMethodMarker.java +0 -91
- data/lib/proguard4.7/src/proguard/optimize/info/NonPrivateMemberMarker.java +0 -171
- data/lib/proguard4.7/src/proguard/optimize/info/PackageVisibleMemberContainingClassMarker.java +0 -85
- data/lib/proguard4.7/src/proguard/optimize/info/PackageVisibleMemberInvokingClassMarker.java +0 -129
- data/lib/proguard4.7/src/proguard/optimize/info/ParameterUsageMarker.java +0 -285
- data/lib/proguard4.7/src/proguard/optimize/info/ReadWriteFieldMarker.java +0 -163
- data/lib/proguard4.7/src/proguard/optimize/info/SideEffectInstructionChecker.java +0 -245
- data/lib/proguard4.7/src/proguard/optimize/info/SideEffectMethodMarker.java +0 -175
- data/lib/proguard4.7/src/proguard/optimize/info/StaticInitializerContainingClassFilter.java +0 -62
- data/lib/proguard4.7/src/proguard/optimize/info/StaticInitializerContainingClassMarker.java +0 -65
- data/lib/proguard4.7/src/proguard/optimize/info/SuperInvocationMarker.java +0 -93
- data/lib/proguard4.7/src/proguard/optimize/info/VariableUsageMarker.java +0 -96
- data/lib/proguard4.7/src/proguard/optimize/info/package.html +0 -4
- data/lib/proguard4.7/src/proguard/optimize/package.html +0 -4
- data/lib/proguard4.7/src/proguard/optimize/peephole/BranchTargetFinder.java +0 -687
- data/lib/proguard4.7/src/proguard/optimize/peephole/ClassFinalizer.java +0 -84
- data/lib/proguard4.7/src/proguard/optimize/peephole/ClassMerger.java +0 -576
- data/lib/proguard4.7/src/proguard/optimize/peephole/GotoCommonCodeReplacer.java +0 -266
- data/lib/proguard4.7/src/proguard/optimize/peephole/GotoGotoReplacer.java +0 -115
- data/lib/proguard4.7/src/proguard/optimize/peephole/GotoReturnReplacer.java +0 -115
- data/lib/proguard4.7/src/proguard/optimize/peephole/HorizontalClassMerger.java +0 -90
- data/lib/proguard4.7/src/proguard/optimize/peephole/InstructionSequenceConstants.java +0 -4424
- data/lib/proguard4.7/src/proguard/optimize/peephole/InstructionSequenceReplacer.java +0 -420
- data/lib/proguard4.7/src/proguard/optimize/peephole/InstructionSequencesReplacer.java +0 -138
- data/lib/proguard4.7/src/proguard/optimize/peephole/MemberPrivatizer.java +0 -103
- data/lib/proguard4.7/src/proguard/optimize/peephole/MethodFinalizer.java +0 -93
- data/lib/proguard4.7/src/proguard/optimize/peephole/MethodInliner.java +0 -597
- data/lib/proguard4.7/src/proguard/optimize/peephole/NopRemover.java +0 -89
- data/lib/proguard4.7/src/proguard/optimize/peephole/PeepholeOptimizer.java +0 -103
- data/lib/proguard4.7/src/proguard/optimize/peephole/ReachableCodeMarker.java +0 -262
- data/lib/proguard4.7/src/proguard/optimize/peephole/RetargetedInnerClassAttributeRemover.java +0 -170
- data/lib/proguard4.7/src/proguard/optimize/peephole/TargetClassChanger.java +0 -455
- data/lib/proguard4.7/src/proguard/optimize/peephole/UnreachableCodeRemover.java +0 -143
- data/lib/proguard4.7/src/proguard/optimize/peephole/UnreachableExceptionRemover.java +0 -163
- data/lib/proguard4.7/src/proguard/optimize/peephole/VariableShrinker.java +0 -129
- data/lib/proguard4.7/src/proguard/optimize/peephole/VerticalClassMerger.java +0 -88
- data/lib/proguard4.7/src/proguard/optimize/peephole/package.html +0 -3
- data/lib/proguard4.7/src/proguard/package.html +0 -5
- data/lib/proguard4.7/src/proguard/preverify/CodePreverifier.java +0 -611
- data/lib/proguard4.7/src/proguard/preverify/CodeSubroutineInliner.java +0 -406
- data/lib/proguard4.7/src/proguard/preverify/Preverifier.java +0 -73
- data/lib/proguard4.7/src/proguard/preverify/SubroutineInliner.java +0 -73
- data/lib/proguard4.7/src/proguard/retrace/MANIFEST.MF +0 -3
- data/lib/proguard4.7/src/proguard/retrace/ReTrace.java +0 -749
- data/lib/proguard4.7/src/proguard/retrace/package.html +0 -4
- data/lib/proguard4.7/src/proguard/shrink/AnnotationUsageMarker.java +0 -333
- data/lib/proguard4.7/src/proguard/shrink/ClassShrinker.java +0 -458
- data/lib/proguard4.7/src/proguard/shrink/InnerUsageMarker.java +0 -174
- data/lib/proguard4.7/src/proguard/shrink/InterfaceUsageMarker.java +0 -152
- data/lib/proguard4.7/src/proguard/shrink/ShortestUsageMark.java +0 -183
- data/lib/proguard4.7/src/proguard/shrink/ShortestUsageMarker.java +0 -277
- data/lib/proguard4.7/src/proguard/shrink/ShortestUsagePrinter.java +0 -210
- data/lib/proguard4.7/src/proguard/shrink/Shrinker.java +0 -181
- data/lib/proguard4.7/src/proguard/shrink/UsageMarker.java +0 -1036
- data/lib/proguard4.7/src/proguard/shrink/UsagePrinter.java +0 -177
- data/lib/proguard4.7/src/proguard/shrink/UsedClassFilter.java +0 -74
- data/lib/proguard4.7/src/proguard/shrink/UsedMemberFilter.java +0 -93
- data/lib/proguard4.7/src/proguard/shrink/package.html +0 -3
- data/lib/proguard4.7/src/proguard/util/AndMatcher.java +0 -49
- data/lib/proguard4.7/src/proguard/util/ClassNameParser.java +0 -216
- data/lib/proguard4.7/src/proguard/util/ConstantMatcher.java +0 -48
- data/lib/proguard4.7/src/proguard/util/EmptyStringMatcher.java +0 -36
- data/lib/proguard4.7/src/proguard/util/ExtensionMatcher.java +0 -63
- data/lib/proguard4.7/src/proguard/util/FileNameParser.java +0 -121
- data/lib/proguard4.7/src/proguard/util/FixedStringMatcher.java +0 -56
- data/lib/proguard4.7/src/proguard/util/ListMatcher.java +0 -69
- data/lib/proguard4.7/src/proguard/util/ListParser.java +0 -137
- data/lib/proguard4.7/src/proguard/util/ListUtil.java +0 -180
- data/lib/proguard4.7/src/proguard/util/NameParser.java +0 -106
- data/lib/proguard4.7/src/proguard/util/NotMatcher.java +0 -46
- data/lib/proguard4.7/src/proguard/util/OrMatcher.java +0 -49
- data/lib/proguard4.7/src/proguard/util/SettableMatcher.java +0 -46
- data/lib/proguard4.7/src/proguard/util/StringMatcher.java +0 -38
- data/lib/proguard4.7/src/proguard/util/StringParser.java +0 -35
- data/lib/proguard4.7/src/proguard/util/VariableStringMatcher.java +0 -126
- data/lib/proguard4.7/src/proguard/util/package.html +0 -3
- data/lib/proguard4.7/src/proguard/wtk/ProGuardObfuscator.java +0 -141
- data/lib/proguard4.7/src/proguard/wtk/default.pro +0 -114
- data/lib/proguard4.7/src/proguard/wtk/package.html +0 -3
Binary file
|
@@ -1,1504 +0,0 @@
|
|
1
|
-
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
5
|
-
<meta http-equiv="content-style-type" content="text/css">
|
6
|
-
<link rel="stylesheet" type="text/css" href="style.css">
|
7
|
-
<title>ProGuard Examples</title>
|
8
|
-
<script type="text/javascript" language="JavaScript">
|
9
|
-
<!--
|
10
|
-
if (window.self==window.top)
|
11
|
-
window.top.location.replace("../index.html#"+window.location.pathname+window.location.hash);
|
12
|
-
else {
|
13
|
-
var hash="#"+window.location.pathname.replace(window.top.location.pathname.replace("index.html", ""), "");
|
14
|
-
if (window.top.location.hash!=hash)
|
15
|
-
window.top.location.hash=hash;
|
16
|
-
}
|
17
|
-
//-->
|
18
|
-
</script>
|
19
|
-
</head>
|
20
|
-
<body>
|
21
|
-
|
22
|
-
<h2>Examples</h2>
|
23
|
-
|
24
|
-
Some typical useful configurations:
|
25
|
-
<ol>
|
26
|
-
<li><a href="#application">A typical application</a></li>
|
27
|
-
<li><a href="#applet">A typical applet</a></li>
|
28
|
-
<li><a href="#midlet">A typical midlet</a></li>
|
29
|
-
<li><a href="#jcapplet">A typical Java Card applet</a></li>
|
30
|
-
<li><a href="#xlet">A typical xlet</a></li>
|
31
|
-
<li><a href="#androidactivity">A simple Android activity</a></li>
|
32
|
-
<li><a href="#androidapplication">A complete Android application</a></li>
|
33
|
-
<li><a href="#library">A typical library</a></li>
|
34
|
-
<li><a href="#applications">All possible applications in the input jars</a></li>
|
35
|
-
<li><a href="#applets">All possible applets in the input jars</a></li>
|
36
|
-
<li><a href="#midlets">All possible midlets in the input jars</a></li>
|
37
|
-
<li><a href="#jcapplets">All possible Java Card applets in the input jars</a></li>
|
38
|
-
<li><a href="#xlets">All possible xlets in the input jars</a></li>
|
39
|
-
<li><a href="#servlets">All possible servlets in the input jars</a></li>
|
40
|
-
<li><a href="#scala">Scala applications with the Scala runtime</a></li>
|
41
|
-
<li><a href="#native">Processing native methods</a></li>
|
42
|
-
<li><a href="#callback">Processing callback methods</a></li>
|
43
|
-
<li><a href="#enumerations">Processing enumeration classes</a></li>
|
44
|
-
<li><a href="#serializable">Processing serializable classes</a></li>
|
45
|
-
<li><a href="#beans">Processing bean classes</a></li>
|
46
|
-
<li><a href="#annotations">Processing annotations</a></li>
|
47
|
-
<li><a href="#database">Processing database drivers</a></li>
|
48
|
-
<li><a href="#componentui">Processing ComponentUI classes</a></li>
|
49
|
-
<li><a href="#rmi">Processing RMI code</a></li>
|
50
|
-
<li><a href="#resourcefiles">Processing resource files</a></li>
|
51
|
-
<li><a href="#manifestfiles">Processing manifest files</a></li>
|
52
|
-
<li><a href="#stacktrace">Producing useful obfuscated stack traces</a></li>
|
53
|
-
<li><a href="#repackaging">Obfuscating package names</a></li>
|
54
|
-
<li><a href="#restructuring">Restructuring the output archives</a></li>
|
55
|
-
<li><a href="#filtering">Filtering the input and the output</a></li>
|
56
|
-
<li><a href="#multiple">Processing multiple applications at once</a></li>
|
57
|
-
<li><a href="#incremental">Incremental obfuscation</a></li>
|
58
|
-
<li><a href="#microedition">Preverifying class files for Java Micro Edition</a></li>
|
59
|
-
<li><a href="#upgrade">Upgrading class files to Java 6</a></li>
|
60
|
-
<li><a href="#deadcode">Finding dead code</a></li>
|
61
|
-
<li><a href="#structure">Printing out the internal structure of class files</a></li>
|
62
|
-
<li><a href="#annotated">Using annotations to configure ProGuard</a></li>
|
63
|
-
</ol>
|
64
|
-
|
65
|
-
You can find some sample configuration files in the <code>examples</code>
|
66
|
-
directory of the ProGuard distribution.
|
67
|
-
|
68
|
-
<h3><a name="application">A typical application</a></h3>
|
69
|
-
|
70
|
-
To shrink, optimize, and obfuscate a simple Java application, you typically
|
71
|
-
create a configuration file like <code>myconfig.pro</code>, which can be used
|
72
|
-
with
|
73
|
-
<pre>
|
74
|
-
bin/proguard @myconfig.pro
|
75
|
-
</pre>
|
76
|
-
<p>
|
77
|
-
The configuration file specifies the input, the output, and the entry points
|
78
|
-
of the application:
|
79
|
-
<pre>
|
80
|
-
-injars myapplication.jar
|
81
|
-
-outjars myapplication_out.jar
|
82
|
-
-libraryjars <java.home>/lib/rt.jar
|
83
|
-
-printmapping myapplication.map
|
84
|
-
|
85
|
-
-keep public class mypackage.MyMain {
|
86
|
-
public static void main(java.lang.String[]);
|
87
|
-
}
|
88
|
-
</pre>
|
89
|
-
<p>
|
90
|
-
Note the use of the <code><java.home></code> system property. ProGuard
|
91
|
-
automatically replaces it when parsing the file.
|
92
|
-
<p>
|
93
|
-
The <a href="usage.html#keep"><code>-keep</code></a> option specifies the
|
94
|
-
entry point of the application that has to be preserved.
|
95
|
-
The access modifiers <code>public</code> and <code>static</code> are not
|
96
|
-
really required in this case, since we know a priori that the specified class
|
97
|
-
and method have the proper access flags. It just looks more familiar this way.
|
98
|
-
<p>
|
99
|
-
Note that all type names are fully specified:
|
100
|
-
<code>mypackage.MyMain</code> and <code>java.lang.String[]</code>.
|
101
|
-
<p>
|
102
|
-
We're writing out an obfuscation mapping file with <a
|
103
|
-
href="usage.html#printmapping"><code>-printmapping</code></a>, for
|
104
|
-
de-obfuscating any stack traces later on, or for incremental obfuscation of
|
105
|
-
extensions.
|
106
|
-
<p>
|
107
|
-
We can further improve the results with a few additional options:
|
108
|
-
<pre>
|
109
|
-
-optimizationpasses 3
|
110
|
-
-overloadaggressively
|
111
|
-
-repackageclasses ''
|
112
|
-
-allowaccessmodification
|
113
|
-
</pre>
|
114
|
-
These options are not required; they just shave off some extra bytes from the
|
115
|
-
output jar, by performing up to 3 optimization passes, and by aggressively
|
116
|
-
obfuscating class members and <a href="#repackaging">package names</a>.
|
117
|
-
<p>
|
118
|
-
In general, you might need a few additional options for processing <a
|
119
|
-
href="#native">native methods</a>, <a href="#callback">callback methods</a>,
|
120
|
-
<a href="#enumerations">enumerations</a>, <a href="#serializable">serializable
|
121
|
-
classes</a>, <a href="#beans">bean classes</a>, <a
|
122
|
-
href="#annotations">annotations</a>, and <a href="#resourcefiles">resource
|
123
|
-
files</a>.
|
124
|
-
|
125
|
-
<h3><a name="applet">A typical applet</a></h3>
|
126
|
-
|
127
|
-
These options shrink, optimize, and obfuscate the applet
|
128
|
-
<code>mypackage.MyApplet</code>:
|
129
|
-
<pre>
|
130
|
-
-injars in.jar
|
131
|
-
-outjars out.jar
|
132
|
-
-libraryjars <java.home>/lib/rt.jar
|
133
|
-
|
134
|
-
-keep public class mypackage.MyApplet
|
135
|
-
</pre>
|
136
|
-
<p>
|
137
|
-
The typical applet methods will be preserved automatically, since
|
138
|
-
<code>mypackage.MyApplet</code> is an extension of the <code>Applet</code>
|
139
|
-
class in the library <code>rt.jar</code>.
|
140
|
-
<p>
|
141
|
-
If applicable, you should add options for processing <a href="#native">native
|
142
|
-
methods</a>, <a href="#callback">callback methods</a>, <a
|
143
|
-
href="#enumerations">enumerations</a>, <a href="#serializable">serializable
|
144
|
-
classes</a>, <a href="#beans">bean classes</a>, <a
|
145
|
-
href="#annotations">annotations</a>, and <a href="#resourcefiles">resource
|
146
|
-
files</a>.
|
147
|
-
|
148
|
-
<h3><a name="midlet">A typical midlet</a></h3>
|
149
|
-
|
150
|
-
These options shrink, optimize, obfuscate, and preverify the midlet
|
151
|
-
<code>mypackage.MyMIDlet</code>:
|
152
|
-
<pre>
|
153
|
-
-injars in.jar
|
154
|
-
-outjars out.jar
|
155
|
-
-libraryjars /usr/local/java/wtk2.5.2/lib/midpapi20.jar
|
156
|
-
-libraryjars /usr/local/java/wtk2.5.2/lib/cldcapi11.jar
|
157
|
-
-overloadaggressively
|
158
|
-
-repackageclasses ''
|
159
|
-
-allowaccessmodification
|
160
|
-
-microedition
|
161
|
-
|
162
|
-
-keep public class mypackage.MyMIDlet
|
163
|
-
</pre>
|
164
|
-
<p>
|
165
|
-
Note how we're now targeting the Java Micro Edition run-time environment of
|
166
|
-
<code>midpapi20.jar</code> and <code>cldcapi11.jar</code>, instead of the Java
|
167
|
-
Standard Edition run-time environment <code>rt.jar</code>. You can target
|
168
|
-
other JME environments by picking the appropriate jars.
|
169
|
-
<p>
|
170
|
-
The typical midlet methods will be preserved automatically, since
|
171
|
-
<code>mypackage.MyMIDlet</code> is an extension of the <code>MIDlet</code>
|
172
|
-
class in the library <code>midpapi20.jar</code>.
|
173
|
-
<p>
|
174
|
-
The <a href="usage.html#microedition"><code>-microedition</code></a> option
|
175
|
-
makes sure the class files are preverified for Java Micro Edition, producing
|
176
|
-
compact <code>StackMap</code> attributes. It is no longer necessary to run an
|
177
|
-
external preverifier.
|
178
|
-
<p>
|
179
|
-
Be careful if you do use the external <code>preverify</code> tool on a platform
|
180
|
-
with a case-insensitive filing system, such as Windows. Because this tool
|
181
|
-
unpacks your processed jars, you should then use ProGuard's <a
|
182
|
-
href="usage.html#dontusemixedcaseclassnames"><code>-dontusemixedcaseclassnames</code></a>
|
183
|
-
option.
|
184
|
-
<p>
|
185
|
-
If applicable, you should add options for processing <a href="#native">native
|
186
|
-
methods</a> and <a href="#resourcefiles">resource files</a>.
|
187
|
-
<p>
|
188
|
-
Note that you will still have to adapt the midlet jar size in the
|
189
|
-
corresponding jad file; ProGuard doesn't do that for you.
|
190
|
-
|
191
|
-
<h3><a name="jcapplet">A typical Java Card applet</a></h3>
|
192
|
-
|
193
|
-
These options shrink, optimize, and obfuscate the Java Card applet
|
194
|
-
<code>mypackage.MyApplet</code>:
|
195
|
-
<pre>
|
196
|
-
-injars in.jar
|
197
|
-
-outjars out.jar
|
198
|
-
-libraryjars /usr/local/java/javacard2.2.2/lib/api.jar
|
199
|
-
-dontwarn java.lang.Class
|
200
|
-
-overloadaggressively
|
201
|
-
-repackageclasses ''
|
202
|
-
-allowaccessmodification
|
203
|
-
|
204
|
-
-keep public class mypackage.MyApplet
|
205
|
-
</pre>
|
206
|
-
<p>
|
207
|
-
The configuration is very similar to the configuration for midlets, except that
|
208
|
-
it now targets the Java Card run-time environment. This environment doesn't
|
209
|
-
have java.lang.Class, so we're telling ProGuard not to worry about it.
|
210
|
-
|
211
|
-
<h3><a name="xlet">A typical xlet</a></h3>
|
212
|
-
|
213
|
-
These options shrink, optimize, and obfuscate the xlet
|
214
|
-
<code>mypackage.MyXlet</code>:
|
215
|
-
<pre>
|
216
|
-
-injars in.jar
|
217
|
-
-outjars out.jar
|
218
|
-
-libraryjars /usr/local/java/jtv1.1/javatv.jar
|
219
|
-
-libraryjars /usr/local/java/cdc1.1/lib/cdc.jar
|
220
|
-
-libraryjars /usr/local/java/cdc1.1/lib/btclasses.zip
|
221
|
-
-overloadaggressively
|
222
|
-
-repackageclasses ''
|
223
|
-
-allowaccessmodification
|
224
|
-
|
225
|
-
-keep public class mypackage.MyXlet
|
226
|
-
</pre>
|
227
|
-
<p>
|
228
|
-
The configuration is very similar to the configuration for midlets, except that
|
229
|
-
it now targets the CDC run-time environment with the Java TV API.
|
230
|
-
|
231
|
-
<h3><a name="androidactivity">A simple Android activity</a></h3>
|
232
|
-
|
233
|
-
These options shrink, optimize, and obfuscate the single Android
|
234
|
-
activity <code>mypackage.MyActivity</code>:
|
235
|
-
<pre>
|
236
|
-
-injars bin/classes
|
237
|
-
-outjars bin/classes-processed.jar
|
238
|
-
-libraryjars /usr/local/java/android-sdk/platforms/android-9/android.jar
|
239
|
-
|
240
|
-
-dontpreverify
|
241
|
-
-repackageclasses ''
|
242
|
-
-allowaccessmodification
|
243
|
-
-optimizations !code/simplification/arithmetic
|
244
|
-
|
245
|
-
-keep public class mypackage.MyActivity
|
246
|
-
</pre>
|
247
|
-
<p>
|
248
|
-
We're targeting the Android run-time and keeping the activity as an entry
|
249
|
-
point.
|
250
|
-
<p>
|
251
|
-
Preverification is irrelevant for the dex compiler and the Dalvik VM, so we
|
252
|
-
can switch it off with the
|
253
|
-
<a href="usage.html#dontpreverify"><code>-dontpreverify</code></a> option.
|
254
|
-
<p>
|
255
|
-
The <a href="usage.html#optimizations"><code>-optimizations</code></a> option
|
256
|
-
disables some arithmetic simplifications that Dalvik 1.0 and 1.5 can't handle.
|
257
|
-
Note that the Dalvik VM also can't
|
258
|
-
handle <a href="usage.html#overloadaggressively">aggressive overloading</a>
|
259
|
-
(of static fields).
|
260
|
-
<p>
|
261
|
-
If applicable, you should add options for processing <a href="#native">native
|
262
|
-
methods</a>, <a href="#callback">callback methods</a>,
|
263
|
-
<a href="#enumerations">enumerations</a>,
|
264
|
-
<a href="#annotations">annotations</a>, and
|
265
|
-
<a href="#resourcefiles">resource files</a>.
|
266
|
-
|
267
|
-
<h3><a name="androidapplication">A complete Android application</a></h3>
|
268
|
-
|
269
|
-
These options shrink, optimize, and obfuscate all public activities, services,
|
270
|
-
broadcast receivers, and content providers from the compiled classes and
|
271
|
-
external libraries:
|
272
|
-
<pre>
|
273
|
-
-injars bin/classes
|
274
|
-
-injars libs
|
275
|
-
-outjars bin/classes-processed.jar
|
276
|
-
-libraryjars /usr/local/java/android-sdk/platforms/android-9/android.jar
|
277
|
-
|
278
|
-
-dontpreverify
|
279
|
-
-repackageclasses ''
|
280
|
-
-allowaccessmodification
|
281
|
-
-optimizations !code/simplification/arithmetic
|
282
|
-
-keepattributes *Annotation*
|
283
|
-
|
284
|
-
-keep public class * extends android.app.Activity
|
285
|
-
-keep public class * extends android.app.Application
|
286
|
-
-keep public class * extends android.app.Service
|
287
|
-
-keep public class * extends android.content.BroadcastReceiver
|
288
|
-
-keep public class * extends android.content.ContentProvider
|
289
|
-
|
290
|
-
-keep public class * extends android.view.View {
|
291
|
-
public <init>(android.content.Context);
|
292
|
-
public <init>(android.content.Context, android.util.AttributeSet);
|
293
|
-
public <init>(android.content.Context, android.util.AttributeSet, int);
|
294
|
-
public void set*(...);
|
295
|
-
}
|
296
|
-
|
297
|
-
-keepclasseswithmembers class * {
|
298
|
-
public <init>(android.content.Context, android.util.AttributeSet);
|
299
|
-
}
|
300
|
-
|
301
|
-
-keepclasseswithmembers class * {
|
302
|
-
public <init>(android.content.Context, android.util.AttributeSet, int);
|
303
|
-
}
|
304
|
-
|
305
|
-
-keepclassmembers class * implements android.os.Parcelable {
|
306
|
-
static android.os.Parcelable$Creator CREATOR;
|
307
|
-
}
|
308
|
-
|
309
|
-
-keepclassmembers class **.R$* {
|
310
|
-
public static <fields>;
|
311
|
-
}
|
312
|
-
</pre>
|
313
|
-
<p>
|
314
|
-
Most importantly, we're keeping all fundamental classes that may be referenced
|
315
|
-
by the <code>AndroidManifest.xml</code> file of the application. If your
|
316
|
-
manifest file contains other classes and methods, you may have to specify
|
317
|
-
those as well.
|
318
|
-
<p>
|
319
|
-
We're keeping annotations, since they might be used by custom
|
320
|
-
<code>RemoteViews</code>.
|
321
|
-
<p>
|
322
|
-
We're keeping any custom <code>View</code> extensions and other classes with
|
323
|
-
typical constructors, since they might be referenced from XML layout files.
|
324
|
-
<p>
|
325
|
-
We're also keeping the required static fields in <code>Parcelable</code>
|
326
|
-
implementations, since they are accessed by introspection.
|
327
|
-
<p>
|
328
|
-
Finally, we're keeping the static fields of referenced inner classes of
|
329
|
-
auto-generated <code>R</code> classes, just in case your code is accessing
|
330
|
-
those fields by introspection. Note that the compiler already inlines
|
331
|
-
primitive fields, so ProGuard can generally remove all these classes entirely
|
332
|
-
anyway (because the classes are not referenced and therefore not required).
|
333
|
-
<p>
|
334
|
-
If you're using additional Google APIs, you'll have to specify
|
335
|
-
those as well, for instance:
|
336
|
-
<pre>
|
337
|
-
-libraryjars /usr/local/android-sdk/add-ons/google_apis-7_r01/libs/maps.jar
|
338
|
-
</pre>
|
339
|
-
<p>
|
340
|
-
If you're using Google's optional License Verification Library, you can
|
341
|
-
obfuscate its code along with your own code. You do have to preserve
|
342
|
-
its <code>ILicensingService</code> interface for the library to work:
|
343
|
-
<pre>
|
344
|
-
-keep public interface com.android.vending.licensing.ILicensingService
|
345
|
-
</pre>
|
346
|
-
<p>
|
347
|
-
If you're using the Android Compatibility library, you should add the
|
348
|
-
following line, to let ProGuard know it's ok that the library references some
|
349
|
-
classes that are not available in all versions of the API:
|
350
|
-
<pre>
|
351
|
-
-dontwarn android.support.**
|
352
|
-
</pre>
|
353
|
-
<p>
|
354
|
-
If applicable, you should add options for processing <a href="#native">native
|
355
|
-
methods</a>, <a href="#callback">callback methods</a>,
|
356
|
-
<a href="#enumerations">enumerations</a>,
|
357
|
-
and <a href="#resourcefiles">resource files</a>. You may also want to add
|
358
|
-
options for producing <a href="#stacktrace">useful stack traces</a>. You can
|
359
|
-
find a complete sample configuration in <code>examples/android.pro</code> in
|
360
|
-
the ProGuard distribution.
|
361
|
-
<p>
|
362
|
-
The build process of the Android SDK (version 2.3 and higher) already
|
363
|
-
integrates ProGuard by default. You only need to enable it (for release
|
364
|
-
builds) by adding <code>proguard.config=proguard.cfg</code> to the file
|
365
|
-
<code>build.properties</code>. In case of problems, you may want to check if
|
366
|
-
the automatically generated file <code>proguard.cfg</code> contains the
|
367
|
-
settings discussed above. The generated Ant build file already sets the input
|
368
|
-
and output files for you.
|
369
|
-
<p>
|
370
|
-
For more information, you can consult the official <a target="other"
|
371
|
-
href="http://developer.android.com/guide/developing/tools/proguard.html">Developer
|
372
|
-
Guide</a> in the Android SDK.
|
373
|
-
|
374
|
-
<h3><a name="library">A typical library</a></h3>
|
375
|
-
|
376
|
-
These options shrink, optimize, and obfuscate an entire library, keeping all
|
377
|
-
public and protected classes and class members, native method names, and
|
378
|
-
serialization code. The processed version of the library can then still be
|
379
|
-
used as such, for developing code based on its public API.
|
380
|
-
<pre>
|
381
|
-
-injars in.jar
|
382
|
-
-outjars out.jar
|
383
|
-
-libraryjars <java.home>/lib/rt.jar
|
384
|
-
-printmapping out.map
|
385
|
-
|
386
|
-
-keepparameternames
|
387
|
-
-renamesourcefileattribute SourceFile
|
388
|
-
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,
|
389
|
-
SourceFile,LineNumberTable,*Annotation*,EnclosingMethod
|
390
|
-
|
391
|
-
-keep public class * {
|
392
|
-
public protected *;
|
393
|
-
}
|
394
|
-
|
395
|
-
-keepclassmembernames class * {
|
396
|
-
java.lang.Class class$(java.lang.String);
|
397
|
-
java.lang.Class class$(java.lang.String, boolean);
|
398
|
-
}
|
399
|
-
|
400
|
-
-keepclasseswithmembernames class * {
|
401
|
-
native <methods>;
|
402
|
-
}
|
403
|
-
|
404
|
-
-keepclassmembers enum * {
|
405
|
-
public static **[] values();
|
406
|
-
public static ** valueOf(java.lang.String);
|
407
|
-
}
|
408
|
-
|
409
|
-
-keepclassmembers class * implements java.io.Serializable {
|
410
|
-
static final long serialVersionUID;
|
411
|
-
private static final java.io.ObjectStreamField[] serialPersistentFields;
|
412
|
-
private void writeObject(java.io.ObjectOutputStream);
|
413
|
-
private void readObject(java.io.ObjectInputStream);
|
414
|
-
java.lang.Object writeReplace();
|
415
|
-
java.lang.Object readResolve();
|
416
|
-
}
|
417
|
-
</pre>
|
418
|
-
<p>
|
419
|
-
This configuration should preserve everything we'll ever want to access in the
|
420
|
-
library. Only if there are any other non-public classes or methods that are
|
421
|
-
invoked dynamically, they should be specified using additional <a
|
422
|
-
href="usage.html#keep"><code>-keep</code></a> options.
|
423
|
-
<p>
|
424
|
-
The <a
|
425
|
-
href="usage.html#keepclassmembernames"><code>-keepclassmembernames</code></a>
|
426
|
-
option for the <code>class$</code> methods is not strictly necessary. These
|
427
|
-
methods are inserted by the <code>javac</code> compiler and the
|
428
|
-
<code>jikes</code> compiler respectively, in JDK 1.2 and older, to implement
|
429
|
-
the <code>.class</code> construct. ProGuard will automatically detect them and
|
430
|
-
deal with them, even when their names have been obfuscated. However, other
|
431
|
-
obfuscators may rely on the original method names. It may therefore be helpful
|
432
|
-
to preserve them, in case these other obfuscators are ever used for further
|
433
|
-
obfuscation of the library.
|
434
|
-
<p>
|
435
|
-
The "Exceptions" attribute has to be preserved, so the compiler knows which
|
436
|
-
exceptions methods may throw.
|
437
|
-
<p>
|
438
|
-
The "InnerClasses" attribute (or more precisely, its source name part) has to
|
439
|
-
be preserved too, for any inner classes that can be referenced from outside the
|
440
|
-
library. The <code>javac</code> compiler would be unable to find the inner
|
441
|
-
classes otherwise.
|
442
|
-
<p>
|
443
|
-
The "Signature" attribute is required to be able to access generic types when
|
444
|
-
compiling in JDK 5.0 and higher.
|
445
|
-
<p>
|
446
|
-
The <a href="usage.html#keepparameternames"><code>-keepparameternames</code></a>
|
447
|
-
option keeps the parameter names in the "LocalVariableTable" and
|
448
|
-
"LocalVariableTypeTable" attributes of public library methods. Some IDEs can
|
449
|
-
present these names to the developers who use the library.
|
450
|
-
<p>
|
451
|
-
Finally, we're keeping the "Deprecated" attribute and the attributes for
|
452
|
-
producing <a href="#stacktrace">useful stack traces</a>.
|
453
|
-
<p>
|
454
|
-
We've also added some options for for processing <a href="#native">native
|
455
|
-
methods</a>, <a href="#enumerations">enumerations</a>, <a
|
456
|
-
href="#serializable">serializable classes</a>, and <a
|
457
|
-
href="#annotations">annotations</a>, which are all discussed in their
|
458
|
-
respective examples.
|
459
|
-
|
460
|
-
<h3><a name="applications">All possible applications in the input jars</a></h3>
|
461
|
-
|
462
|
-
These options shrink, optimize, and obfuscate all public applications in
|
463
|
-
<code>in.jar</code>:
|
464
|
-
<pre>
|
465
|
-
-injars in.jar
|
466
|
-
-outjars out.jar
|
467
|
-
-libraryjars <java.home>/lib/rt.jar
|
468
|
-
-printseeds
|
469
|
-
|
470
|
-
-keepclasseswithmembers public class * {
|
471
|
-
public static void main(java.lang.String[]);
|
472
|
-
}
|
473
|
-
</pre>
|
474
|
-
<p>
|
475
|
-
Note the use of <a
|
476
|
-
href="usage.html#keepclasseswithmembers"><code>-keepclasseswithmembers</code></a>.
|
477
|
-
We don't want to preserve all classes, just all classes that have main
|
478
|
-
methods, and those methods.
|
479
|
-
<p>
|
480
|
-
The <a href="usage.html#printseeds"><code>-printseeds</code></a> option prints
|
481
|
-
out which classes exactly will be preserved, so we know for sure we're getting
|
482
|
-
what we want.
|
483
|
-
<p>
|
484
|
-
If applicable, you should add options for processing <a href="#native">native
|
485
|
-
methods</a>, <a href="#callback">callback methods</a>, <a
|
486
|
-
href="#enumerations">enumerations</a>, <a href="#serializable">serializable
|
487
|
-
classes</a>, <a href="#beans">bean classes</a>, <a
|
488
|
-
href="#annotations">annotations</a>, and <a href="#resourcefiles">resource
|
489
|
-
files</a>.
|
490
|
-
|
491
|
-
<h3><a name="applets">All possible applets in the input jars</a></h3>
|
492
|
-
|
493
|
-
These options shrink, optimize, and obfuscate all public applets in
|
494
|
-
<code>in.jar</code>:
|
495
|
-
<pre>
|
496
|
-
-injars in.jar
|
497
|
-
-outjars out.jar
|
498
|
-
-libraryjars <java.home>/lib/rt.jar
|
499
|
-
-printseeds
|
500
|
-
|
501
|
-
-keep public class * extends java.applet.Applet
|
502
|
-
</pre>
|
503
|
-
<p>
|
504
|
-
We're simply keeping all classes that extend the <code>Applet</code> class.
|
505
|
-
<p>
|
506
|
-
Again, the <a href="usage.html#printseeds"><code>-printseeds</code></a> option
|
507
|
-
prints out which applets exactly will be preserved.
|
508
|
-
<p>
|
509
|
-
If applicable, you should add options for processing <a href="#native">native
|
510
|
-
methods</a>, <a href="#callback">callback methods</a>, <a
|
511
|
-
href="#enumerations">enumerations</a>, <a href="#serializable">serializable
|
512
|
-
classes</a>, <a href="#beans">bean classes</a>, <a
|
513
|
-
href="#annotations">annotations</a>, and <a href="#resourcefiles">resource
|
514
|
-
files</a>.
|
515
|
-
|
516
|
-
<h3><a name="midlets">All possible midlets in the input jars</a></h3>
|
517
|
-
|
518
|
-
These options shrink, optimize, obfuscate, and preverify all public midlets in
|
519
|
-
<code>in.jar</code>:
|
520
|
-
<pre>
|
521
|
-
-injars in.jar
|
522
|
-
-outjars out.jar
|
523
|
-
-libraryjars /usr/local/java/wtk2.5.2/lib/midpapi20.jar
|
524
|
-
-libraryjars /usr/local/java/wtk2.5.2/lib/cldcapi11.jar
|
525
|
-
-overloadaggressively
|
526
|
-
-repackageclasses ''
|
527
|
-
-allowaccessmodification
|
528
|
-
-microedition
|
529
|
-
-printseeds
|
530
|
-
|
531
|
-
-keep public class * extends javax.microedition.midlet.MIDlet
|
532
|
-
</pre>
|
533
|
-
<p>
|
534
|
-
We're simply keeping all classes that extend the <code>MIDlet</code> class.
|
535
|
-
<p>
|
536
|
-
The <a href="usage.html#microedition"><code>-microedition</code></a> option
|
537
|
-
makes sure the class files are preverified for Java Micro Edition, producing
|
538
|
-
compact <code>StackMap</code> attributes. It is no longer necessary to run an
|
539
|
-
external preverifier.
|
540
|
-
<p>
|
541
|
-
Be careful if you do use the external <code>preverify</code> tool on a platform
|
542
|
-
with a case-insensitive filing system, such as Windows. Because this tool
|
543
|
-
unpacks your processed jars, you should then use ProGuard's <a
|
544
|
-
href="usage.html#dontusemixedcaseclassnames"><code>-dontusemixedcaseclassnames</code></a>
|
545
|
-
option.
|
546
|
-
<p>
|
547
|
-
The <a href="usage.html#printseeds"><code>-printseeds</code></a> option prints
|
548
|
-
out which midlets exactly will be preserved.
|
549
|
-
<p>
|
550
|
-
If applicable, you should add options for processing <a href="#native">native
|
551
|
-
methods</a> and <a href="#resourcefiles">resource files</a>.
|
552
|
-
<p>
|
553
|
-
Note that you will still have to adapt the midlet jar size in the
|
554
|
-
corresponding jad file; ProGuard doesn't do that for you.
|
555
|
-
|
556
|
-
<h3><a name="jcapplets">All possible Java Card applets in the input jars</a></h3>
|
557
|
-
|
558
|
-
These options shrink, optimize, and obfuscate all public Java Card applets in
|
559
|
-
<code>in.jar</code>:
|
560
|
-
<pre>
|
561
|
-
-injars in.jar
|
562
|
-
-outjars out.jar
|
563
|
-
-libraryjars /usr/local/java/javacard2.2.2/lib/api.jar
|
564
|
-
-dontwarn java.lang.Class
|
565
|
-
-overloadaggressively
|
566
|
-
-repackageclasses ''
|
567
|
-
-allowaccessmodification
|
568
|
-
-printseeds
|
569
|
-
|
570
|
-
-keep public class * implements javacard.framework.Applet
|
571
|
-
</pre>
|
572
|
-
<p>
|
573
|
-
We're simply keeping all classes that implement the <code>Applet</code>
|
574
|
-
interface.
|
575
|
-
<p>
|
576
|
-
The <a href="usage.html#printseeds"><code>-printseeds</code></a> option prints
|
577
|
-
out which applets exactly will be preserved.
|
578
|
-
|
579
|
-
<h3><a name="xlets">All possible xlets in the input jars</a></h3>
|
580
|
-
|
581
|
-
These options shrink, optimize, and obfuscate all public xlets in
|
582
|
-
<code>in.jar</code>:
|
583
|
-
<pre>
|
584
|
-
-injars in.jar
|
585
|
-
-outjars out.jar
|
586
|
-
-libraryjars /usr/local/java/jtv1.1/javatv.jar
|
587
|
-
-libraryjars /usr/local/java/cdc1.1/lib/cdc.jar
|
588
|
-
-libraryjars /usr/local/java/cdc1.1/lib/btclasses.zip
|
589
|
-
-overloadaggressively
|
590
|
-
-repackageclasses ''
|
591
|
-
-allowaccessmodification
|
592
|
-
-printseeds
|
593
|
-
|
594
|
-
-keep public class * implements javax.tv.xlet.Xlet
|
595
|
-
</pre>
|
596
|
-
<p>
|
597
|
-
We're simply keeping all classes that implement the <code>Xlet</code> interface.
|
598
|
-
<p>
|
599
|
-
The <a href="usage.html#printseeds"><code>-printseeds</code></a> option prints
|
600
|
-
out which xlets exactly will be preserved.
|
601
|
-
|
602
|
-
<h3><a name="servlets">All possible servlets in the input jars</a></h3>
|
603
|
-
|
604
|
-
These options shrink, optimize, and obfuscate all public servlets in
|
605
|
-
<code>in.jar</code>:
|
606
|
-
<pre>
|
607
|
-
-injars in.jar
|
608
|
-
-outjars out.jar
|
609
|
-
-libraryjars <java.home>/lib/rt.jar
|
610
|
-
-libraryjars /usr/local/java/servlet/servlet.jar
|
611
|
-
-printseeds
|
612
|
-
|
613
|
-
-keep public class * implements javax.servlet.Servlet
|
614
|
-
</pre>
|
615
|
-
<p>
|
616
|
-
Keeping all servlets is very similar to keeping all applets. The servlet API
|
617
|
-
is not part of the standard run-time jar, so we're specifying it as a library.
|
618
|
-
Don't forget to use the right path name.
|
619
|
-
<p>
|
620
|
-
We're then keeping all classes that implement the <code>Servlet</code>
|
621
|
-
interface. We're using the <code>implements</code> keyword because it looks
|
622
|
-
more familiar in this context, but it is equivalent to <code>extends</code>,
|
623
|
-
as far as ProGuard is concerned.
|
624
|
-
<p>
|
625
|
-
The <a href="usage.html#printseeds"><code>-printseeds</code></a> option prints
|
626
|
-
out which servlets exactly will be preserved.
|
627
|
-
<p>
|
628
|
-
If applicable, you should add options for processing <a href="#native">native
|
629
|
-
methods</a>, <a href="#callback">callback methods</a>, <a
|
630
|
-
href="#enumerations">enumerations</a>, <a href="#serializable">serializable
|
631
|
-
classes</a>, <a href="#beans">bean classes</a>, <a
|
632
|
-
href="#annotations">annotations</a>, and <a href="#resourcefiles">resource
|
633
|
-
files</a>.
|
634
|
-
|
635
|
-
<h3><a name="scala">Scala applications with the Scala runtime</a></h3>
|
636
|
-
|
637
|
-
These options shrink, optimize, and obfuscate all public Scala applications in
|
638
|
-
<code>in.jar</code>:
|
639
|
-
<pre>
|
640
|
-
-injars in.jar
|
641
|
-
-injars /usr/local/java/scala-2.9.1/lib/scala-library.jar
|
642
|
-
-outjars out.jar
|
643
|
-
-libraryjars <java.home>/lib/rt.jar
|
644
|
-
|
645
|
-
-dontwarn scala.**
|
646
|
-
|
647
|
-
-keepclasseswithmembers public class * {
|
648
|
-
public static void main(java.lang.String[]);
|
649
|
-
}
|
650
|
-
|
651
|
-
-keep class * implements org.xml.sax.EntityResolver
|
652
|
-
|
653
|
-
-keepclassmembers class * {
|
654
|
-
** MODULE$;
|
655
|
-
}
|
656
|
-
|
657
|
-
-keepclassmembernames class scala.concurrent.forkjoin.ForkJoinPool {
|
658
|
-
long eventCount;
|
659
|
-
int workerCounts;
|
660
|
-
int runControl;
|
661
|
-
scala.concurrent.forkjoin.ForkJoinPool$WaitQueueNode syncStack;
|
662
|
-
scala.concurrent.forkjoin.ForkJoinPool$WaitQueueNode spareStack;
|
663
|
-
}
|
664
|
-
|
665
|
-
-keepclassmembernames class scala.concurrent.forkjoin.ForkJoinWorkerThread {
|
666
|
-
int base;
|
667
|
-
int sp;
|
668
|
-
int runState;
|
669
|
-
}
|
670
|
-
|
671
|
-
-keepclassmembernames class scala.concurrent.forkjoin.ForkJoinTask {
|
672
|
-
int status;
|
673
|
-
}
|
674
|
-
|
675
|
-
-keepclassmembernames class scala.concurrent.forkjoin.LinkedTransferQueue {
|
676
|
-
scala.concurrent.forkjoin.LinkedTransferQueue$PaddedAtomicReference head;
|
677
|
-
scala.concurrent.forkjoin.LinkedTransferQueue$PaddedAtomicReference tail;
|
678
|
-
scala.concurrent.forkjoin.LinkedTransferQueue$PaddedAtomicReference cleanMe;
|
679
|
-
}
|
680
|
-
</pre>
|
681
|
-
<p>
|
682
|
-
The configuration is essentially the same as
|
683
|
-
for <a href="#applications">processing applications</a>, because Scala is
|
684
|
-
compiled to ordinary Java bytecode. However, the example processes the Scala
|
685
|
-
runtime library as well. The processed jar can be an order of magnitude
|
686
|
-
smaller and a few times faster than the original code (for the Scala code
|
687
|
-
examples, for instance).
|
688
|
-
<p>
|
689
|
-
The <a href="usage.html#dontwarn"><code>-dontwarn</code></a> option tells
|
690
|
-
ProGuard not to complain about some artefacts in the Scala runtime, the way it
|
691
|
-
is compiled by the <code>scalac</code> compiler (at least in Scala 2.9.1 and
|
692
|
-
older). Note that this option should always be used with care.
|
693
|
-
<p>
|
694
|
-
The additional <a href="usage.html#keepoverview"><code>-keep</code></a>
|
695
|
-
options make sure that some classes and some fields that are accessed by means
|
696
|
-
of introspection are not removed or renamed.
|
697
|
-
<p>
|
698
|
-
If applicable, you should add options for processing <a href="#native">native
|
699
|
-
methods</a>, <a href="#callback">callback methods</a>, <a
|
700
|
-
href="#enumerations">enumerations</a>, <a href="#serializable">serializable
|
701
|
-
classes</a>, <a href="#beans">bean classes</a>, <a
|
702
|
-
href="#annotations">annotations</a>, and <a href="#resourcefiles">resource
|
703
|
-
files</a>.
|
704
|
-
<h3><a name="native">Processing native methods</a></h3>
|
705
|
-
|
706
|
-
If your application, applet, servlet, library, etc., contains native methods,
|
707
|
-
you'll want to preserve their names and their classes' names, so they can
|
708
|
-
still be linked to the native library. The following additional option will
|
709
|
-
ensure that:
|
710
|
-
<pre>
|
711
|
-
-keepclasseswithmembernames class * {
|
712
|
-
native <methods>;
|
713
|
-
}
|
714
|
-
</pre>
|
715
|
-
<p>
|
716
|
-
Note the use of <a
|
717
|
-
href="usage.html#keepclasseswithmembernames"><code>-keepclasseswithmembernames</code></a>.
|
718
|
-
We don't want to preserve all classes or all native methods; we just want to
|
719
|
-
keep the relevant names from being obfuscated.
|
720
|
-
<p>
|
721
|
-
ProGuard doesn't look at your native code, so it won't automatically preserve
|
722
|
-
the classes or class members that are invoked by the native code. These are
|
723
|
-
entry points, which you'll have to specify explicitly. <a
|
724
|
-
href="callback">Callback methods</a> are discussed below as a typical example.
|
725
|
-
|
726
|
-
<h3><a name="callback">Processing callback methods</a></h3>
|
727
|
-
|
728
|
-
If your application, applet, servlet, library, etc., contains callback
|
729
|
-
methods, which are called from external code (native code, scripts,...),
|
730
|
-
you'll want to preserve them, and probably their classes too. They are just
|
731
|
-
entry points to your code, much like, say, the main method of an application.
|
732
|
-
If they aren't preserved by other <code>-keep</code> options, something like
|
733
|
-
the following option will keep the callback class and method:
|
734
|
-
<pre>
|
735
|
-
-keep class mypackage.MyCallbackClass {
|
736
|
-
void myCallbackMethod(java.lang.String);
|
737
|
-
}
|
738
|
-
</pre>
|
739
|
-
<p>
|
740
|
-
This will preserve the given class and method from being removed or renamed.
|
741
|
-
|
742
|
-
<h3><a name="enumerations">Processing enumeration classes</a></h3>
|
743
|
-
|
744
|
-
If your application, applet, servlet, library, etc., contains enumeration
|
745
|
-
classes, you'll have to preserve some special methods. Enumerations were
|
746
|
-
introduced in Java 5. The java compiler translates enumerations into classes
|
747
|
-
with a special structure. Notably, the classes contain implementations of some
|
748
|
-
static methods that the run-time environment accesses by introspection (Isn't
|
749
|
-
that just grand? Introspection is the self-modifying code of a new
|
750
|
-
generation). You have to specify these explicitly, to make sure they aren't
|
751
|
-
removed or obfuscated:
|
752
|
-
<pre>
|
753
|
-
-keepclassmembers enum * {
|
754
|
-
public static **[] values();
|
755
|
-
public static ** valueOf(java.lang.String);
|
756
|
-
}
|
757
|
-
</pre>
|
758
|
-
|
759
|
-
<h3><a name="serializable">Processing serializable classes</a></h3>
|
760
|
-
|
761
|
-
More complex applications, applets, servlets, libraries, etc., may contain
|
762
|
-
classes that are serialized. Depending on the way in which they are used, they
|
763
|
-
may require special attention:
|
764
|
-
<ul>
|
765
|
-
|
766
|
-
<li>Often, serialization is simply a means of transporting data, without
|
767
|
-
long-term storage. Classes that are shrunk and obfuscated should then
|
768
|
-
continue to function fine with the following additional options:
|
769
|
-
|
770
|
-
<pre>
|
771
|
-
-keepclassmembers class * implements java.io.Serializable {
|
772
|
-
private static final java.io.ObjectStreamField[] serialPersistentFields;
|
773
|
-
private void writeObject(java.io.ObjectOutputStream);
|
774
|
-
private void readObject(java.io.ObjectInputStream);
|
775
|
-
java.lang.Object writeReplace();
|
776
|
-
java.lang.Object readResolve();
|
777
|
-
}
|
778
|
-
</pre>
|
779
|
-
<p>
|
780
|
-
|
781
|
-
The <a
|
782
|
-
href="usage.html#keepclassmembers"><code>-keepclassmembers</code></a>
|
783
|
-
option makes sure that any serialization methods are kept. By using this
|
784
|
-
option instead of the basic <code>-keep</code> option, we're not
|
785
|
-
forcing preservation of <i>all</i> serializable classes, just preservation
|
786
|
-
of the listed members of classes that are actually used.</li>
|
787
|
-
|
788
|
-
<li>Sometimes, the serialized data are stored, and read back later into newer
|
789
|
-
versions of the serializable classes. One then has to take care the classes
|
790
|
-
remain compatible with their unprocessed versions and with future
|
791
|
-
processed versions. In such cases, the relevant classes will most likely
|
792
|
-
have <code>serialVersionUID</code> fields. The following options should
|
793
|
-
then be sufficient to ensure compatibility over time:
|
794
|
-
|
795
|
-
<pre>
|
796
|
-
-keepnames class * implements java.io.Serializable
|
797
|
-
|
798
|
-
-keepclassmembers class * implements java.io.Serializable {
|
799
|
-
static final long serialVersionUID;
|
800
|
-
private static final java.io.ObjectStreamField[] serialPersistentFields;
|
801
|
-
!static !transient <fields>;
|
802
|
-
private void writeObject(java.io.ObjectOutputStream);
|
803
|
-
private void readObject(java.io.ObjectInputStream);
|
804
|
-
java.lang.Object writeReplace();
|
805
|
-
java.lang.Object readResolve();
|
806
|
-
}
|
807
|
-
</pre>
|
808
|
-
<p>
|
809
|
-
|
810
|
-
The <code>serialVersionUID</code> and <code>serialPersistentFields</code>
|
811
|
-
lines makes sure those fields are preserved, if they are present.
|
812
|
-
The <code><fields></code> line preserves all non-static,
|
813
|
-
non-transient fields, with their original names. The introspection of the
|
814
|
-
serialization process and the de-serialization process will then find
|
815
|
-
consistent names.</li>
|
816
|
-
|
817
|
-
<li>Occasionally, the serialized data have to remain compatible, but the
|
818
|
-
classes involved lack <code>serialVersionUID</code> fields. I imagine the
|
819
|
-
original code will then be hard to maintain, since the serial version UID
|
820
|
-
is then computed from a list of features the serializable class. Changing
|
821
|
-
the class ever so slightly may change the computed serial version UID. The
|
822
|
-
list of features is specified in the section on <a
|
823
|
-
href="http://java.sun.com/javase/6/docs/platform/serialization/spec/class.html#4100">Stream
|
824
|
-
Unique Identifiers</a> of Sun's <a
|
825
|
-
href="http://java.sun.com/javase/6/docs/platform/serialization/spec/serialTOC.html">Java
|
826
|
-
Object Serialization Specification</a>. The following directives should at
|
827
|
-
least partially ensure compatibility with the original classes:
|
828
|
-
|
829
|
-
<pre>
|
830
|
-
-keepnames class * implements java.io.Serializable
|
831
|
-
|
832
|
-
-keepclassmembers class * implements java.io.Serializable {
|
833
|
-
static final long serialVersionUID;
|
834
|
-
private static final java.io.ObjectStreamField[] serialPersistentFields;
|
835
|
-
!static !transient <fields>;
|
836
|
-
!private <fields>;
|
837
|
-
!private <methods>;
|
838
|
-
private void writeObject(java.io.ObjectOutputStream);
|
839
|
-
private void readObject(java.io.ObjectInputStream);
|
840
|
-
java.lang.Object writeReplace();
|
841
|
-
java.lang.Object readResolve();
|
842
|
-
}
|
843
|
-
</pre>
|
844
|
-
<p>
|
845
|
-
|
846
|
-
The new options force preservation of the elements involved in the UID
|
847
|
-
computation. In addition, the user will have to manually specify all
|
848
|
-
interfaces of the serializable classes (using something like "<code>-keep
|
849
|
-
interface MyInterface</code>"), since these names are also used when
|
850
|
-
computing the UID. A fast but sub-optimal alternative would be simply
|
851
|
-
keeping all interfaces with "<code>-keep interface *</code>".</li>
|
852
|
-
|
853
|
-
</ul>
|
854
|
-
<p>
|
855
|
-
|
856
|
-
Note that the above options may preserve more classes and class members
|
857
|
-
than strictly necessary. For instance, a large number of classes may implement
|
858
|
-
the <code>Serialization</code> interface, yet only a small number may actually
|
859
|
-
ever be serialized. Knowing your application and tuning the configuration
|
860
|
-
often produces more compact results.
|
861
|
-
|
862
|
-
<h3><a name="beans">Processing bean classes</a></h3>
|
863
|
-
|
864
|
-
If your application, applet, servlet, library, etc., makes extensive use of
|
865
|
-
introspection on bean classes to find bean editor classes, or getter and
|
866
|
-
setter methods, then configuration may become painful. There's not much else
|
867
|
-
you can do than making sure the bean class names, or the getter and setter
|
868
|
-
names don't change. For instance:
|
869
|
-
<pre>
|
870
|
-
-keep public class mypackage.MyBean {
|
871
|
-
public void setMyProperty(int);
|
872
|
-
public int getMyProperty();
|
873
|
-
}
|
874
|
-
|
875
|
-
-keep public class mypackage.MyBeanEditor
|
876
|
-
</pre>
|
877
|
-
<p>
|
878
|
-
If there are too many elements to list explicitly, wildcards in class names
|
879
|
-
and method signatures might be helpful. This example should encompasses all
|
880
|
-
possible setters and getters in classes in the package <code>mybeans</code>:
|
881
|
-
<pre>
|
882
|
-
-keep class mybeans.** {
|
883
|
-
void set*(***);
|
884
|
-
void set*(int, ***);
|
885
|
-
|
886
|
-
boolean is*();
|
887
|
-
boolean is*(int);
|
888
|
-
|
889
|
-
*** get*();
|
890
|
-
*** get*(int);
|
891
|
-
}
|
892
|
-
</pre>
|
893
|
-
<p>
|
894
|
-
The '<code>***</code>' wildcard matches any type (primitive or non-primitive,
|
895
|
-
array or non-array). The methods with the '<code>int</code>' arguments matches
|
896
|
-
properties that are lists.
|
897
|
-
|
898
|
-
<h3><a name="annotations">Processing annotations</a></h3>
|
899
|
-
|
900
|
-
If your application, applet, servlet, library, etc., uses annotations, you may
|
901
|
-
want to preserve them in the processed output. Annotations are represented by
|
902
|
-
attributes that have no direct effect on the execution of the code. However,
|
903
|
-
their values can be retrieved through introspection, allowing developers to
|
904
|
-
adapt the execution behavior accordingly. By default, ProGuard treats
|
905
|
-
annotation attributes as optional, and removes them in the obfuscation step.
|
906
|
-
If they are required, you'll have to specify this explicitly:
|
907
|
-
<pre>
|
908
|
-
-keepattributes *Annotation*
|
909
|
-
</pre>
|
910
|
-
<p>
|
911
|
-
For brevity, we're specifying a wildcarded attribute name, which will match
|
912
|
-
<code>RuntimeVisibleAnnotations</code>,
|
913
|
-
<code>RuntimeInvisibleAnnotations</code>,
|
914
|
-
<code>RuntimeVisibleParameterAnnotations</code>,
|
915
|
-
<code>RuntimeInvisibleParameterAnnotations</code>, and
|
916
|
-
<code>AnnotationDefault</code>. Depending on the purpose of the processed
|
917
|
-
code, you could refine this selection, for instance not keeping the run-time
|
918
|
-
invisible annotations (which are only used at compile-time).
|
919
|
-
<p>
|
920
|
-
Some code may make further use of introspection to figure out the enclosing
|
921
|
-
methods of anonymous inner classes. In that case, the corresponding attribute
|
922
|
-
has to be preserved as well:
|
923
|
-
<pre>
|
924
|
-
-keepattributes EnclosingMethod
|
925
|
-
</pre>
|
926
|
-
|
927
|
-
<h3><a name="database">Processing database drivers</a></h3>
|
928
|
-
|
929
|
-
Database drivers are implementations of the <code>Driver</code> interface.
|
930
|
-
Since they are often created dynamically, you may want to preserve any
|
931
|
-
implementations that you are processing as entry points:
|
932
|
-
<pre>
|
933
|
-
-keep class * implements java.sql.Driver
|
934
|
-
</pre>
|
935
|
-
<p>
|
936
|
-
This option also gets rid of the note that ProGuard prints out about
|
937
|
-
<code>(java.sql.Driver)Class.forName</code> constructs, if you are
|
938
|
-
instantiating a driver in your code (without necessarily implementing any
|
939
|
-
drivers yourself).
|
940
|
-
|
941
|
-
<h3><a name="componentui">Processing ComponentUI classes</a></h3>
|
942
|
-
|
943
|
-
Swing UI look and feels are implemented as extensions of the
|
944
|
-
<code>ComponentUI</code> class. For some reason, these have to contain a
|
945
|
-
static method <code>createUI</code>, which the Swing API invokes using
|
946
|
-
introspection. You should therefore always preserve the method as an entry
|
947
|
-
point, for instance like this:
|
948
|
-
<pre>
|
949
|
-
-keep class * extends javax.swing.plaf.ComponentUI {
|
950
|
-
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent);
|
951
|
-
}
|
952
|
-
</pre>
|
953
|
-
<p>
|
954
|
-
This option also keeps the classes themselves.
|
955
|
-
|
956
|
-
<h3><a name="rmi">Processing RMI code</a></h3>
|
957
|
-
|
958
|
-
Reportedly, the easiest way to handle RMI code is to process the code with
|
959
|
-
ProGuard first and then invoke the <code>rmic</code> tool. If that is not
|
960
|
-
possible, you may want to try something like this:
|
961
|
-
<pre>
|
962
|
-
-keepattributes Exceptions
|
963
|
-
|
964
|
-
-keep interface * extends java.rmi.Remote {
|
965
|
-
<methods>;
|
966
|
-
}
|
967
|
-
|
968
|
-
-keep class * implements java.rmi.Remote {
|
969
|
-
<init>(java.rmi.activation.ActivationID, java.rmi.MarshalledObject);
|
970
|
-
}
|
971
|
-
</pre>
|
972
|
-
<p>
|
973
|
-
The first <code>-keep</code> option keeps all your Remote interfaces and their
|
974
|
-
methods. The second one keeps all the implementations, along with their
|
975
|
-
particular RMI constructors, if any.
|
976
|
-
<p>
|
977
|
-
The <code>Exceptions</code> attribute has to be kept too, because the RMI
|
978
|
-
handling code performs introspection to check whether the method signatures
|
979
|
-
are compatible.
|
980
|
-
|
981
|
-
<h3><a name="resourcefiles">Processing resource files</a></h3>
|
982
|
-
|
983
|
-
If your application, applet, servlet, library, etc., contains resource files,
|
984
|
-
it may be necessary to adapt their names and/or their contents when the
|
985
|
-
application is obfuscated. The following two options can achieve this
|
986
|
-
automatically:
|
987
|
-
<pre>
|
988
|
-
-adaptresourcefilenames **.properties,**.gif,**.jpg
|
989
|
-
-adaptresourcefilecontents **.properties,META-INF/MANIFEST.MF
|
990
|
-
</pre>
|
991
|
-
<p>
|
992
|
-
The <a href="usage.html#adaptresourcefilenames">-adaptresourcefilenames</a>
|
993
|
-
option in this case renames properties files and image files in the processed
|
994
|
-
output, based on the obfuscated names of their corresponding class files (if
|
995
|
-
any). The <a
|
996
|
-
href="usage.html#adaptresourcefilecontents">-adaptresourcefilecontents</a>
|
997
|
-
option looks for class names in properties files and in the manifest file, and
|
998
|
-
replaces these names by the obfuscated names (if any). You'll probably want to
|
999
|
-
adapt the filters to suit your application.
|
1000
|
-
|
1001
|
-
<h3><a name="manifestfiles">Processing manifest files</a></h3>
|
1002
|
-
|
1003
|
-
As illustrated in the previous section, manifest files can be treated like
|
1004
|
-
ordinary resource files. ProGuard can adapt obfuscated class names in the
|
1005
|
-
files, but it won't make any other changes. If you want anything else, you
|
1006
|
-
should apply an external tool. For instance, if a manifest file contains
|
1007
|
-
signing information, you should sign the jar again after it has been
|
1008
|
-
processed.
|
1009
|
-
<p>
|
1010
|
-
If you're merging several input jars into a single output jar, you'll have to
|
1011
|
-
pick one, typically by specifying <a href="usage.html#filters">filters</a>:
|
1012
|
-
<pre>
|
1013
|
-
-injars in1.jar
|
1014
|
-
-injars in2.jar(!META-INF/MANIFEST.MF)
|
1015
|
-
-injars in3.jar(!META-INF/MANIFEST.MF)
|
1016
|
-
-outjars out.jar
|
1017
|
-
</pre>
|
1018
|
-
<p>
|
1019
|
-
The filters will let ProGuard copy the manifest file from the first jar and
|
1020
|
-
ignore any manifest files in the second and third input jars. Note that
|
1021
|
-
ProGuard will leave the order of the files in the jars unchanged; manifest
|
1022
|
-
files are not necessarily put first.
|
1023
|
-
|
1024
|
-
<h3><a name="stacktrace">Producing useful obfuscated stack traces</a></h3>
|
1025
|
-
|
1026
|
-
These options let obfuscated applications or libraries produce stack traces
|
1027
|
-
that can still be deciphered later on:
|
1028
|
-
<pre>
|
1029
|
-
-printmapping out.map
|
1030
|
-
|
1031
|
-
-renamesourcefileattribute SourceFile
|
1032
|
-
-keepattributes SourceFile,LineNumberTable
|
1033
|
-
</pre>
|
1034
|
-
<p>
|
1035
|
-
We're keeping all source file attributes, but we're replacing their values by
|
1036
|
-
the string "SourceFile". We could use any string. This string is already
|
1037
|
-
present in all class files, so it doesn't take up any extra space. If you're
|
1038
|
-
working with J++, you'll want to keep the "SourceDir" attribute as well.
|
1039
|
-
<p>
|
1040
|
-
We're also keeping the line number tables of all methods.
|
1041
|
-
<p>
|
1042
|
-
Whenever both of these attributes are present, the Java run-time environment
|
1043
|
-
will include line number information when printing out exception stack traces.
|
1044
|
-
<p>
|
1045
|
-
The information will only be useful if we can map the obfuscated names back to
|
1046
|
-
their original names, so we're saving the mapping to a file
|
1047
|
-
<code>out.map</code>. The information can then be used by the <a
|
1048
|
-
href="retrace/index.html">ReTrace</a> tool to restore the original stack trace.
|
1049
|
-
|
1050
|
-
<h3><a name="repackaging">Obfuscating package names</a></h3>
|
1051
|
-
|
1052
|
-
Package names can be obfuscated in various ways, with increasing levels of
|
1053
|
-
obfuscation and compactness. For example, consider the following classes:
|
1054
|
-
<pre>
|
1055
|
-
mycompany.myapplication.MyMain
|
1056
|
-
mycompany.myapplication.Foo
|
1057
|
-
mycompany.myapplication.Bar
|
1058
|
-
mycompany.myapplication.extra.FirstExtra
|
1059
|
-
mycompany.myapplication.extra.SecondExtra
|
1060
|
-
mycompany.util.FirstUtil
|
1061
|
-
mycompany.util.SecondUtil
|
1062
|
-
</pre>
|
1063
|
-
<p>
|
1064
|
-
Let's assume the class name <code>mycompany.myapplication.MyMain</code> is the
|
1065
|
-
main application class that is kept by the configuration. All other class names
|
1066
|
-
can be obfuscated.
|
1067
|
-
<p>
|
1068
|
-
By default, packages that contain classes that can't be renamed aren't renamed
|
1069
|
-
either, and the package hierarchy is preserved. This results in obfuscated
|
1070
|
-
class names like these:
|
1071
|
-
<pre>
|
1072
|
-
mycompany.myapplication.MyMain
|
1073
|
-
mycompany.myapplication.a
|
1074
|
-
mycompany.myapplication.b
|
1075
|
-
mycompany.myapplication.a.a
|
1076
|
-
mycompany.myapplication.a.b
|
1077
|
-
mycompany.a.a
|
1078
|
-
mycompany.a.b
|
1079
|
-
</pre>
|
1080
|
-
<p>
|
1081
|
-
The <a
|
1082
|
-
href="usage.html#flattenpackagehierarchy"><code>-flattenpackagehierarchy</code></a>
|
1083
|
-
option obfuscates the package names further, by flattening the package
|
1084
|
-
hierarchy of obfuscated packages:
|
1085
|
-
<pre>
|
1086
|
-
-flattenpackagehierarchy 'myobfuscated'
|
1087
|
-
</pre>
|
1088
|
-
<p>
|
1089
|
-
The obfuscated class names then look as follows:
|
1090
|
-
<pre>
|
1091
|
-
mycompany.myapplication.MyMain
|
1092
|
-
mycompany.myapplication.a
|
1093
|
-
mycompany.myapplication.b
|
1094
|
-
myobfuscated.a.a
|
1095
|
-
myobfuscated.a.b
|
1096
|
-
myobfuscated.b.a
|
1097
|
-
myobfuscated.b.b
|
1098
|
-
</pre>
|
1099
|
-
<p>
|
1100
|
-
Alternatively, the <a
|
1101
|
-
href="usage.html#repackageclasses"><code>-repackageclasses</code></a> option
|
1102
|
-
obfuscates the entire packaging, by combining obfuscated classes into a single
|
1103
|
-
package:
|
1104
|
-
<pre>
|
1105
|
-
-repackageclasses 'myobfuscated'
|
1106
|
-
</pre>
|
1107
|
-
The obfuscated class names then look as follows:
|
1108
|
-
<pre>
|
1109
|
-
mycompany.myapplication.MyMain
|
1110
|
-
mycompany.myapplication.a
|
1111
|
-
mycompany.myapplication.b
|
1112
|
-
myobfuscated.a
|
1113
|
-
myobfuscated.b
|
1114
|
-
myobfuscated.c
|
1115
|
-
myobfuscated.d
|
1116
|
-
</pre>
|
1117
|
-
<p>
|
1118
|
-
Additionally specifying the <a
|
1119
|
-
href="usage.html#allowaccessmodification"><code>-allowaccessmodification</code></a>
|
1120
|
-
option allows access permissions of classes and class members to
|
1121
|
-
be broadened, opening up the opportunity to repackage all obfuscated classes:
|
1122
|
-
<pre>
|
1123
|
-
-repackageclasses 'myobfuscated'
|
1124
|
-
-allowaccessmodification
|
1125
|
-
</pre>
|
1126
|
-
The obfuscated class names then look as follows:
|
1127
|
-
<pre>
|
1128
|
-
mycompany.myapplication.MyMain
|
1129
|
-
myobfuscated.a
|
1130
|
-
myobfuscated.b
|
1131
|
-
myobfuscated.c
|
1132
|
-
myobfuscated.d
|
1133
|
-
myobfuscated.e
|
1134
|
-
myobfuscated.f
|
1135
|
-
</pre>
|
1136
|
-
<p>
|
1137
|
-
The specified target package can always be the root package. For instance:
|
1138
|
-
<pre>
|
1139
|
-
-repackageclasses ''
|
1140
|
-
-allowaccessmodification
|
1141
|
-
</pre>
|
1142
|
-
The obfuscated class names are then the shortest possible names:
|
1143
|
-
<pre>
|
1144
|
-
mycompany.myapplication.MyMain
|
1145
|
-
a
|
1146
|
-
b
|
1147
|
-
c
|
1148
|
-
d
|
1149
|
-
e
|
1150
|
-
f
|
1151
|
-
</pre>
|
1152
|
-
<p>
|
1153
|
-
Note that not all levels of obfuscation of package names may be acceptable for
|
1154
|
-
all code. Notably, you may have to take into account that your application may
|
1155
|
-
contain <a href="#resourcefiles">resource files</a> that have to be adapted.
|
1156
|
-
|
1157
|
-
<h3><a name="restructuring">Restructuring the output archives</a></h3>
|
1158
|
-
|
1159
|
-
In simple applications, all output classes and resources files are merged into
|
1160
|
-
a single jar. For example:
|
1161
|
-
<pre>
|
1162
|
-
-injars classes
|
1163
|
-
-injars in1.jar
|
1164
|
-
-injars in2.jar
|
1165
|
-
-injars in3.jar
|
1166
|
-
-outjars out.jar
|
1167
|
-
</pre>
|
1168
|
-
<p>
|
1169
|
-
This configuration merges the processed versions of the files in the
|
1170
|
-
<code>classes</code> directory and the three jars into a single output jar
|
1171
|
-
<code>out.jar</code>.
|
1172
|
-
<p>
|
1173
|
-
If you want to preserve the structure of your input jars (and/or wars, ears,
|
1174
|
-
zips, or directories), you can specify an output directory (or a war, an ear,
|
1175
|
-
or a zip). For example:
|
1176
|
-
<pre>
|
1177
|
-
-injars in1.jar
|
1178
|
-
-injars in2.jar
|
1179
|
-
-injars in3.jar
|
1180
|
-
-outjars out
|
1181
|
-
</pre>
|
1182
|
-
<p>
|
1183
|
-
The input jars will then be reconstructed in the directory <code>out</code>,
|
1184
|
-
with their original names.
|
1185
|
-
<p>
|
1186
|
-
You can also combine archives into higher level archives. For example:
|
1187
|
-
<pre>
|
1188
|
-
-injars in1.jar
|
1189
|
-
-injars in2.jar
|
1190
|
-
-injars in3.jar
|
1191
|
-
-outjars out.war
|
1192
|
-
</pre>
|
1193
|
-
<p>
|
1194
|
-
The other way around, you can flatten the archives inside higher level
|
1195
|
-
archives into simple archives:
|
1196
|
-
<pre>
|
1197
|
-
-injars in.war
|
1198
|
-
-outjars out.jar
|
1199
|
-
</pre>
|
1200
|
-
<p>
|
1201
|
-
This configuration puts the processed contents of all jars inside
|
1202
|
-
<code>in.war</code> (plus any other contents of <code>in.war</code>) into
|
1203
|
-
<code>out.jar</code>.
|
1204
|
-
<p>
|
1205
|
-
If you want to combine input jars (and/or wars, ears, zips, or directories)
|
1206
|
-
into output jars (and/or wars, ears, zips, or directories), you can group the
|
1207
|
-
<a href="usage.html#injars"><code>-injars</code></a> and <a
|
1208
|
-
href="usage.html#outjars"><code>-outjars</code></a> options. For example:
|
1209
|
-
<pre>
|
1210
|
-
-injars base_in1.jar
|
1211
|
-
-injars base_in2.jar
|
1212
|
-
-injars base_in3.jar
|
1213
|
-
-outjars base_out.jar
|
1214
|
-
|
1215
|
-
-injars extra_in.jar
|
1216
|
-
-outjars extra_out.jar
|
1217
|
-
</pre>
|
1218
|
-
<p>
|
1219
|
-
This configuration puts the processed results of all <code>base_in*.jar</code>
|
1220
|
-
jars into <code>base_out.jar</code>, and the processed results of the
|
1221
|
-
<code>extra_in.jar</code> into <code>extra_out.jar</code>. Note that only the
|
1222
|
-
order of the options matters; the additional whitespace is just for clarity.
|
1223
|
-
<p>
|
1224
|
-
This grouping, archiving, and flattening can be arbitrarily complex. ProGuard
|
1225
|
-
always tries to package output archives in a sensible way, reconstructing the
|
1226
|
-
input entries as much as required.
|
1227
|
-
|
1228
|
-
<h3><a name="filtering">Filtering the input and the output</a></h3>
|
1229
|
-
|
1230
|
-
If you want even greater control, you can add
|
1231
|
-
<a href="usage.html#filters">filters</a> to the input and the output,
|
1232
|
-
filtering out zips, ears, wars, jars, and/or ordinary files. For example, if
|
1233
|
-
you want to disregard certain files from an input jar:
|
1234
|
-
<pre>
|
1235
|
-
-injars in.jar(!images/**)
|
1236
|
-
-outjars out.jar
|
1237
|
-
</pre>
|
1238
|
-
<p>
|
1239
|
-
This configuration removes any files in the <code>images</code> directory and
|
1240
|
-
its subdirectories.
|
1241
|
-
<p>
|
1242
|
-
Such filters can be convenient for avoiding warnings about duplicate files in
|
1243
|
-
the output. For example, only keeping the manifest file from a first input jar:
|
1244
|
-
<pre>
|
1245
|
-
-injars in1.jar
|
1246
|
-
-injars in2.jar(!META-INF/MANIFEST.MF)
|
1247
|
-
-injars in3.jar(!META-INF/MANIFEST.MF)
|
1248
|
-
-outjars out.jar
|
1249
|
-
</pre>
|
1250
|
-
<p>
|
1251
|
-
Another useful application is speeding up the processing by ProGuard, by
|
1252
|
-
disregarding a large number of irrelevant classes in the runtime library jar:
|
1253
|
-
<pre>
|
1254
|
-
-libraryjars <java.home>/lib/rt.jar(java/**,javax/**)
|
1255
|
-
</pre>
|
1256
|
-
<p>
|
1257
|
-
The filter makes ProGuard disregard <code>com.sun.**</code> classes, for
|
1258
|
-
instance , which don't affect the processing of ordinary applications.
|
1259
|
-
<p>
|
1260
|
-
It is also possible to filter the jars (and/or wars, ears, zips) themselves,
|
1261
|
-
based on their names. For example:
|
1262
|
-
<pre>
|
1263
|
-
-injars in(**/acme_*.jar;)
|
1264
|
-
-outjars out.jar
|
1265
|
-
</pre>
|
1266
|
-
<p>
|
1267
|
-
Note the semi-colon in the filter; the filter in front of it applies to jar
|
1268
|
-
names. In this case, only <code>acme_*.jar</code> jars are read from the
|
1269
|
-
directory <code>in</code> and its subdirectories. Filters for war names, ear
|
1270
|
-
names, and zip names can be prefixed with additional semi-colons. All types of
|
1271
|
-
filters can be combined. They are orthogonal.
|
1272
|
-
<p>
|
1273
|
-
On the other hand, you can also filter the output, in order to control what
|
1274
|
-
content goes where. For example:
|
1275
|
-
<pre>
|
1276
|
-
-injars in.jar
|
1277
|
-
-outjars code_out.jar(**.class)
|
1278
|
-
-outjars resources_out.jar
|
1279
|
-
</pre>
|
1280
|
-
<p>
|
1281
|
-
This configuration splits the processed output, sending <code>**.class</code>
|
1282
|
-
files to <code>code_out.jar</code>, and all remaining files to
|
1283
|
-
<code>resources_out.jar</code>.
|
1284
|
-
<p>
|
1285
|
-
Again, the filtering can be arbitrarily complex, especially when combined with
|
1286
|
-
grouping input and output.
|
1287
|
-
|
1288
|
-
<h3><a name="multiple">Processing multiple applications at once</a></h3>
|
1289
|
-
|
1290
|
-
You can process several dependent or independent applications (or applets,
|
1291
|
-
midlets,...) in one go, in order to save time and effort. ProGuard's input and
|
1292
|
-
output handling offers various ways to keep the output nicely structured.
|
1293
|
-
<p>
|
1294
|
-
The easiest way is to specify your input jars (and/or wars, ears, zips, and
|
1295
|
-
directories) and a single output directory. ProGuard will then reconstruct the
|
1296
|
-
input in this directory, using the original jar names. For example, showing
|
1297
|
-
just the input and output options:
|
1298
|
-
<pre>
|
1299
|
-
-injars application1.jar
|
1300
|
-
-injars application2.jar
|
1301
|
-
-injars application3.jar
|
1302
|
-
-outjars processed_applications
|
1303
|
-
</pre>
|
1304
|
-
<p>
|
1305
|
-
After processing, the directory <code>processed_applications</code> will
|
1306
|
-
contain processed versions of application jars, with their original names.
|
1307
|
-
|
1308
|
-
<h3><a name="incremental">Incremental obfuscation</a></h3>
|
1309
|
-
|
1310
|
-
After having <a href="#application">processed an application</a>, e.g.
|
1311
|
-
ProGuard itself, you can still incrementally add other pieces of code that
|
1312
|
-
depend on it, e.g. the ProGuard GUI:
|
1313
|
-
<pre>
|
1314
|
-
-injars proguardgui.jar
|
1315
|
-
-outjars proguardgui_out.jar
|
1316
|
-
-injars proguard.jar
|
1317
|
-
-outjars proguard_out.jar
|
1318
|
-
-libraryjars <java.home>/lib/rt.jar
|
1319
|
-
-applymapping proguard.map
|
1320
|
-
|
1321
|
-
-keep public class proguard.gui.ProGuardGUI {
|
1322
|
-
public static void main(java.lang.String[]);
|
1323
|
-
}
|
1324
|
-
</pre>
|
1325
|
-
<p>
|
1326
|
-
We're reading both unprocessed jars as input. Their processed contents will go
|
1327
|
-
to the respective output jars. The <a
|
1328
|
-
href="usage.html#applymapping"><code>-applymapping</code></a> option then
|
1329
|
-
makes sure the ProGuard part of the code gets the previously produced
|
1330
|
-
obfuscation mapping. The final application will consist of the obfuscated
|
1331
|
-
ProGuard jar and the additional obfuscated GUI jar.
|
1332
|
-
<p>
|
1333
|
-
The added code in this example is straightforward; it doesn't affect the
|
1334
|
-
original code. The <code>proguard_out.jar</code> will be identical to the one
|
1335
|
-
produced in the initial processing step. If you foresee adding more complex
|
1336
|
-
extensions to your code, you should specify the options <a
|
1337
|
-
href="usage.html#useuniqueclassmembernames"><code>-useuniqueclassmembernames</code></a>,
|
1338
|
-
<a href="usage.html#dontshrink"><code>-dontshrink</code></a>, and <a
|
1339
|
-
href="usage.html#dontoptimize"><code>-dontoptimize</code></a> <i>in the
|
1340
|
-
original processing step</i>. These options ensure that the obfuscated base
|
1341
|
-
jar will always remain usable without changes. You can then specify the base
|
1342
|
-
jar as a library jar:
|
1343
|
-
<pre>
|
1344
|
-
-injars proguardgui.jar
|
1345
|
-
-outjars proguardgui_out.jar
|
1346
|
-
-libraryjars proguard.jar
|
1347
|
-
-libraryjars <java.home>/lib/rt.jar
|
1348
|
-
-applymapping proguard.map
|
1349
|
-
|
1350
|
-
-keep public class proguard.gui.ProGuardGUI {
|
1351
|
-
public static void main(java.lang.String[]);
|
1352
|
-
}
|
1353
|
-
</pre>
|
1354
|
-
|
1355
|
-
<h3><a name="microedition">Preverifying class files for Java Micro Edition</a></h3>
|
1356
|
-
|
1357
|
-
Even if you're not interested in shrinking, optimizing, and obfuscating your
|
1358
|
-
midlets, as shown in the <a href="#midlets">midlets example</a>, you can still
|
1359
|
-
use ProGuard to preverify the class files for Java Micro Edition. ProGuard
|
1360
|
-
produces slightly more compact results than the traditional external
|
1361
|
-
preverifier.
|
1362
|
-
<pre>
|
1363
|
-
-injars in.jar
|
1364
|
-
-outjars out.jar
|
1365
|
-
-libraryjars /usr/local/java/wtk2.5.2/lib/midpapi20.jar
|
1366
|
-
-libraryjars /usr/local/java/wtk2.5.2/lib/cldcapi11.jar
|
1367
|
-
|
1368
|
-
-dontshrink
|
1369
|
-
-dontoptimize
|
1370
|
-
-dontobfuscate
|
1371
|
-
|
1372
|
-
-microedition
|
1373
|
-
</pre>
|
1374
|
-
<p>
|
1375
|
-
We're not processing the input, just making sure the class files are
|
1376
|
-
preverified by targeting them at Java Micro Edition with the <a
|
1377
|
-
href="usage.html#microedition"><code>-microedition</code></a> option. Note
|
1378
|
-
that we don't need any <code>-keep</code> options to specify entry points; all
|
1379
|
-
class files are simply preverified.
|
1380
|
-
|
1381
|
-
<h3><a name="upgrade">Upgrading class files to Java 6</a></h3>
|
1382
|
-
|
1383
|
-
The following options upgrade class files to Java 6, by updating their
|
1384
|
-
internal version numbers and preverifying them. The class files can then be
|
1385
|
-
loaded more efficiently by the Java 6 Virtual Machine.
|
1386
|
-
<pre>
|
1387
|
-
-injars in.jar
|
1388
|
-
-outjars out.jar
|
1389
|
-
-libraryjars <java.home>/lib/rt.jar
|
1390
|
-
|
1391
|
-
-dontshrink
|
1392
|
-
-dontoptimize
|
1393
|
-
-dontobfuscate
|
1394
|
-
|
1395
|
-
-target 1.6
|
1396
|
-
</pre>
|
1397
|
-
<p>
|
1398
|
-
We're not processing the input, just retargeting the class files with the <a
|
1399
|
-
href="usage.html#target"><code>-target</code></a> option. They will
|
1400
|
-
automatically be preverified for Java 6 as a result. Note that we don't need
|
1401
|
-
any <code>-keep</code> options to specify entry points; all class files are
|
1402
|
-
simply updated and preverified.
|
1403
|
-
|
1404
|
-
<h3><a name="deadcode">Finding dead code</a></h3>
|
1405
|
-
|
1406
|
-
These options list unused classes, fields, and methods in the application
|
1407
|
-
<code>mypackage.MyApplication</code>:
|
1408
|
-
<pre>
|
1409
|
-
-injars in.jar
|
1410
|
-
-libraryjars <java.home>/lib/rt.jar
|
1411
|
-
|
1412
|
-
-dontoptimize
|
1413
|
-
-dontobfuscate
|
1414
|
-
-dontpreverify
|
1415
|
-
-printusage
|
1416
|
-
|
1417
|
-
-keep public class mypackage.MyApplication {
|
1418
|
-
public static void main(java.lang.String[]);
|
1419
|
-
}
|
1420
|
-
</pre>
|
1421
|
-
<p>
|
1422
|
-
We're not specifying an output jar, just printing out some results. We're
|
1423
|
-
saving some processing time by skipping the other processing steps.
|
1424
|
-
<p>
|
1425
|
-
The java compiler inlines primitive constants and String constants
|
1426
|
-
(<code>static final</code> fields). ProGuard would therefore list such fields
|
1427
|
-
as not being used in the class files that it analyzes, even if they <i>are</i>
|
1428
|
-
used in the source files. We can add a <a
|
1429
|
-
href="usage.html#keepclassmembers"><code>-keepclassmembers</code></a> option
|
1430
|
-
that keeps those fields a priori, in order to avoid having them listed:
|
1431
|
-
<pre>
|
1432
|
-
-keepclassmembers class * {
|
1433
|
-
static final % *;
|
1434
|
-
static final java.lang.String *;
|
1435
|
-
}
|
1436
|
-
</pre>
|
1437
|
-
|
1438
|
-
<h3><a name="structure">Printing out the internal structure of class files</a></h3>
|
1439
|
-
|
1440
|
-
These options print out the internal structure of all class files in the input
|
1441
|
-
jar:
|
1442
|
-
<pre>
|
1443
|
-
-injars in.jar
|
1444
|
-
|
1445
|
-
-dontshrink
|
1446
|
-
-dontoptimize
|
1447
|
-
-dontobfuscate
|
1448
|
-
-dontpreverify
|
1449
|
-
|
1450
|
-
-dump
|
1451
|
-
</pre>
|
1452
|
-
<p>
|
1453
|
-
Note how we don't need to specify the Java run-time jar, because we're not
|
1454
|
-
processing the input jar at all.
|
1455
|
-
|
1456
|
-
<h3><a name="annotated">Using annotations to configure ProGuard</a></h3>
|
1457
|
-
|
1458
|
-
The traditional ProGuard configuration allows to keep a clean separation
|
1459
|
-
between the code and the configuration for shrinking, optimization, and
|
1460
|
-
obfuscation. However, it is also possible to define specific annotations,
|
1461
|
-
and then annotate the code to configure the processing.
|
1462
|
-
<p>
|
1463
|
-
You can find a set of such predefined annotations in the directory
|
1464
|
-
<code>examples/annotations/lib</code> in the ProGuard distribution.
|
1465
|
-
The annotation classes are defined in <code>annotations.jar</code>. The
|
1466
|
-
corresponding ProGuard configuration (or meta-configuration, if you prefer)
|
1467
|
-
is specified in <code>annotations.pro</code>. With these files, you can start
|
1468
|
-
annotating your code. For instance, a java source file
|
1469
|
-
<code>Application.java</code> can be annotated as follows:
|
1470
|
-
<pre>
|
1471
|
-
@KeepApplication
|
1472
|
-
public class Application {
|
1473
|
-
....
|
1474
|
-
}
|
1475
|
-
</pre>
|
1476
|
-
<p>
|
1477
|
-
The ProGuard configuration file for the application can then be simplified by
|
1478
|
-
leveraging off these annotations:
|
1479
|
-
<pre>
|
1480
|
-
-injars in.jar
|
1481
|
-
-outjars out.jar
|
1482
|
-
-libraryjars <java.home>/lib/rt.jar
|
1483
|
-
|
1484
|
-
-include lib/annotations.pro
|
1485
|
-
</pre>
|
1486
|
-
<p>
|
1487
|
-
The annotations are effectively replacing the application-dependent
|
1488
|
-
<code>-keep</code> options. You may still wish to add traditional
|
1489
|
-
<code>-keep</code> options for processing <a href="#native">native
|
1490
|
-
methods</a>, <a href="#enumerations">enumerations</a>, <a
|
1491
|
-
href="#serializable">serializable classes</a>, and <a
|
1492
|
-
href="#annotations">annotations</a>.
|
1493
|
-
<p>
|
1494
|
-
The directory <code>examples/annotations</code> contains more examples that
|
1495
|
-
illustrate some of the possibilities.
|
1496
|
-
|
1497
|
-
<hr />
|
1498
|
-
<noscript><div><a target="_top" href="../index.html" class="button">Show menu</a></div></noscript>
|
1499
|
-
<address>
|
1500
|
-
Copyright © 2002-2011
|
1501
|
-
<a target="other" href="http://www.lafortune.eu/">Eric Lafortune</a>.
|
1502
|
-
</address>
|
1503
|
-
</body>
|
1504
|
-
</html>
|