ant
directory to the main directory of your Android project:
dexguard-project.txt custom_rules.xml
local.properties in your Android project. For instance:
dexguard.dir=/usr/local/DexGuard5.0
[dexguard] in the console replace all lines with
[proguard], [dex], [dx],
[apkbuilder], [signjar], and
[zip-align].
DexGuard is most commonly applied to final application projects. This is the easiest and most effective approach, since it processes the combined code in a single step.
DexGuard can also be applied to library projects, if the library jar is the final product. You should then take some care with class encryption, as discussed for the class encryption option. Furthermore, tamper detection is only supported if the final application is also built and packaged using DexGuard.
You can find examples of working projects in the directory samples.
ant with the usual targets, such as
debug and release. For instance, to build the release
version of your application and install it on a connected device:
ant release installDebug builds use debug settings, without optimization or obfuscation. Release builds use release settings, with full optimization and obfuscation. Applications can optionally be signed. The entries in application archives are always zip-aligned for efficiency.
The Ant build picks up custom configurations from the following optional files in your Android project:
dexguard-project.txt (for all targets) dexguard-project-debug.txt (for target 'debug') dexguard-project-release.txt (for target 'release') proguard-project.txt (for backward compatibility with ProGuard)The default version of the first file contains a number of settings that can be enabled to perform string encryption, class encryption, and to hide access to sensitive APIs.
local.properties:
verbose = true
local.properties of your
Android project. For example:
key.store = /home/user/.android/debug.keystore key.store.password = android key.alias = androiddebugkey key.alias.password = androidIf you don't specify passwords, the build process will ask for them.
custom_rules.xml in the main
directory of your Android project.