Annotation Type Hardening
App hardening build hints, checked by the compiler.
Place this on your application's main class -- the class named by
codename1.mainName. An attribute you do not set is not written at all, so
the build server's own default applies. The default clause below each
attribute names a constant that says nothing -- see HintUnset -- and this
package deliberately does not record what the server would do instead,
because that is the server's to change.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionPermits a local or source build to run with hardening requested but not applied.Overrides control-flow obfuscation independently of harden.level.Keep rules in ProGuard syntax, one per line, for classes that are resolved by name at runtime and so can't be found by the automatic analysis.Master switch for app hardening: off, standard, aggressive or paranoid.Overrides symbol renaming independently of harden.level.Overrides string obfuscation independently of harden.level: off, constants or all.
-
Element Details
-
allowUnhardenedLocalBuild
Toggle allowUnhardenedLocalBuildPermits a local or source build to run with hardening requested but not applied. Without it such a build is refused, so a hardened app is never shipped from a target that can't actually harden it.- Default:
DEFAULT
-
controlFlow
HardenControlFlow controlFlowOverrides control-flow obfuscation independently of harden.level.- Default:
DEFAULT
-
keep
String keepKeep rules in ProGuard syntax, one per line, for classes that are resolved by name at runtime and so can't be found by the automatic analysis. Same syntax as android.proguardKeep, so existing rules port directly. Rules are separated by newlines only, because a semicolon is legal inside a rule body such as { *; }.- Default:
""
-
level
HardenLevel levelMaster switch for app hardening: off, standard, aggressive or paranoid. An unrecognized value fails the build rather than being treated as off.- Default:
DEFAULT
-
rename
-
strings
HardenStrings stringsOverrides string obfuscation independently of harden.level: off, constants or all.- Default:
DEFAULT
-